Leaderboard
You are given a list of integers nums
, representing the number of chess matches each person has won. Return a relative ranking (0-indexed) of each person. If two players have won the same amount, their ranking should be the same.
Constraints
n ≤ 100,000
wheren
is the length ofnums
https://binarysearch.com/problems/Leaderboard
Examples
Example 1
Input
- nums =
[50, 30, 50, 90, 10]
Output
- answer =
[1, 2, 1, 0, 3]
Leave a comment