• + 0 comments

    You can assume that the list of scores from the player will always be in ascending order. It would be nice to know that as part of the criteria.

    As an alternative, you could probably turn the player scores into pairs with their array index, sort them ascending, and then map the ranks to the pair's index to ensure correct ordering even if scores are out of order. That would be a real world-ish scenario.