Design a Leaderboard

Talk it through out loud with your AI coach.

The problem

  • medium
  • Pro

A mobile game with five million players wants a live global leaderboard showing the top one hundred and each player's own rank, updated as soon as a game ends. Design how you'd store scores and answer these queries quickly.

What a strong answer covers

  • Why a straightforward database query struggles at this size.
  • A data structure that keeps players ordered as scores change.
  • How scores survive if the fast store is lost.
  • Extras such as ties, time-boxed boards and growing beyond one machine.

Common mistake: Proposing a fast in-memory store with no durable copy, so a restart wipes every score.

Knowing this is half of it. Saying it clearly out loud is the part the coach helps you practise.

Practise it out loud