Leaderboard by score and name

A code exercise of about 10 minutes: read the statement, solve «Leaderboard by score and name» in the browser and get a review like in a real interview.

Code · 10 min
Loading…

Statement

Write leaderboard(players): each player is { name, score }. Return the names sorted by score from highest to lowest and, on a tie, by name alphabetically. Don't modify the list you receive.