Given the scores of athletes, return their ranks, with the top three receiving medal labels. Because the number of ranks is bounded by the array size, sorting by score and assigning labels is straightforward.
score = array of distinct athlete scores
array of rank strings
Example 1:
Input:
score = [5,4,3,2,1]
Output:
["Gold Medal","Silver Medal","Bronze Medal","4","5"]
Explanation:
Scores are ranked from highest to lowest.
Example 2:
Input:
score = [10,3,8,9,4]
Output:
["Gold Medal","5","Bronze Medal","Silver Medal","4"]
Explanation:
Ranks are assigned after sorting by score.