Object-Oriented Programming · Pinterest · Medium
Build a tracker that records the Pins a single Pinterest user has viewed, along with each Pin's score, and can report the best-scoring Pin seen inside a recent time window. The original interview prompt talked about windows such as the past week and the past 24 hours, and also described a simplified variant that only considers the 10 latest records. Here the time-window version is expressed through one configurable length, window. Because the prompt left several details open…