Data structures · Multiple choice

A game needs a live leaderboard for 10 million players: the top 100 and any player's rank, updated on every score. What fits best?

easy Caching

Options

Why

A sorted set keeps members ordered by score as they change, so ZADD, ZREVRANK and ZRANGE key 0 99 REV stay fast. Sorting 10 million rows on each request does not scale.

Review this in your daily deck All cards in Data structures