β back to unit
Medium
# sorting medium
Where Would You Rank?
The leaderboard is live, and your score just came in β what rank do you get? π
You get the existing scores and yours. Your rank is 1 plus the number of scores strictly bigger than yours. Print your rank.
Example:
Input: scores = [90, 40, 70], yours = 80
Output: 2
Only 90 beats your 80 β 1 score is strictly bigger, so your rank is 1 + 1 = 2.
π‘ need a hint?
sort-where-would-you-rank.pyπ given lines are locked β write your code in between
loading...