Interview practice question
Leaderboard with ties and time-based tie-breaking
Backend Engineering · NoSQL and Redis · Intermediate
In your Redis leaderboard, players with the same score should be ranked by who reached it first. How do you implement this?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Sorted set score is a single number.
- Encode tie-breaker into score.
- Score = points * factor + (maxTs - ts).
- Or composite member names.
- Watch float precision limits.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.