Mock Interviewer
Ask Coach
Tap a question to start, or type your own below.
Game Leaderboard System Design
Visual Problem Diagram

Scenario
Boss kill weekend: 5M players submit scores in an hour and the global top-100 must update within seconds without sorting five million rows on every read. The interview contrasts real-time top-K, sharded ranks, and periodic reset leaderboards.
Design a game leaderboard that ingests score submissions and serves global top-N and personal rank queries in near real time. Naive "sort all scores on read" fails at million-player scale.
You should support score submit, global/friends boards, tie-breaking, and periodic resets. Be ready to explain sorted sets, sharding, and cached top-K.
Constraints
Submit score, global top-N, rank around user, friends board optional, daily/weekly reset
< 100 ms top-100 read p95, accept millions writes/hour, approximate rank OK if stated
10M DAU, 1K scores/s peak, 100M historical players, global + per-game boards
Stages ahead
Log in to start practicing
Preview the problem below. Sign in to start your timed session, save progress, and use the AI coach.