
Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
What data structure can we use to keep the players' data?
Keep a map (dictionary) of player scores.
For each top(K) function call, find the maximum K scores and add them.