0

I have a list [4,1,3] that show scores of players, now I need a list that will show places in the tournament of players, that means that a new list should look like [0,2,1] as a player with highest scores got 0 place, player with a second highest score get a place and player with the lowest score get 2 place, what is an algorithm that makes a new list? Also, it should work with a list with more or less than 3 players.

UPDATE: Forgot to mention, its not allowed to use any libraries

0 Answers0