Skip to Content

Coding Interviews: System Design

A video service (like youtube) has many viewers watching videos. Given a stream of the video IDs that are being watched, we need to find the top K most viewed videos for different periods of time (1 hour, 1 day, 1 month, all time). For the top K videos returned, we also want the count of views during this period.