Facebook | System Design | Hacker Rank / LeetCode Contest, Leadership Board System

I see this question appear quite a lot for Facebook onsites. Does anyone have a good solution for this?

Some questions I would want answered:

  1. How would you implement ranking in real time?
  2. Will the leaderboard be in real time? Or are there any limitations to how often the leaderboard can be calculated?
  3. What happens to the leaderboard if the players are currently playing? How can we provide a leaderboard that is processing streaming data in real time?
  4. What algorithms can we use to calculate top 15 players for 1 day, 3 days, 7 days and 1 month?
  5. What about leaderboards for regions/districts/games/friend circles/etc?
Comments (9)