1244. Design A Leaderboard

Design a Leaderboard class that supports:

  • addScore(playerId, score): Update the score for a player by adding score to their existing score (or create new entry with score if player doesn't exist).
  • top(k): Return the sum of the top k scores across all players.
  • reset(playerId): Reset the score of the specified player to 0.
Examples
Input: [["Leaderboard","addScore","addScore","addScore","top","reset","top"],[[],[1,1],[2,2],[3,3],[3],[1],[3]]]
Output: [null,null,null,null,6,null,5]
Hints
Related Problems

1244. Design A Leaderboard

Design a `Leaderboard` class that supports: