YOUR BRIEF
What to work through
Work through a top songs widget as a spoken system design interview. Start by clarifying the scope, sketch a working design and explain the trade-offs behind your choices.
- Return the top K most played items, K up to 1,000
- Windows: last hour, last day, last month and all time
- Every play counts toward every window it falls in
BEFORE YOU START
Constraints to discuss
- A play shows up in the counts within 1 minute
- Answers in tens of milliseconds
- Exact counts first; approximate only when the interviewer allows it
- About 700,000 plays a second at YouTube Shorts scale (Hello Interview)
Need a starting point?
Watch for these common gaps as you prepare:
- One database write per play with no batching
- Computing the top K with a scan and sort on every request
- Ignoring late events at window edges
- Reaching for a time-series database that cannot handle billions of distinct ids
Why this question is in the collection
These sources connect the problem to company interview reports or preparation guides. They do not guarantee what a company will ask you.