š [Mš Challenge] SoloLearn Leaderboard System
Monday Blue š Challenge Series #2 In case you don't already know, the XP ranking of SoloLearn leaderboard is quite interesting as users with the same XP will be sharing the same rank. For example, given the XP list [1, 5, 5, 6, 35, 35, 35] the leaderboard will be shown as below:- Rank 1 : 35 Rank 1 : 35 Rank 1 : 35 Rank 4 : 6 Rank 5 : 5 Rank 5 : 5 Rank 7 : 1 š¼ TASK Write a program to accept an array of XP and output the leaderboard as format above. š§ TEST CASE ā [1, 5, 6, 37] 1 ā¶ 37 2 ā¶ 6 3 ā¶ 5 4 ā¶ 1 ā [1, 2, 2, 3] 1 ā¶ 3 2 ā¶ 2 2 ā¶ 2 4 ā¶ 1 ā [1, 5, 5, 6, 6, 6, 32, 32, 37] 1 ā¶ 37 2 ā¶ 32 2 ā¶ 32 4 ā¶ 6 4 ā¶ 6 4 ā¶ 6 7 ā¶ 5 7 ā¶ 5 9 ā¶ 1 Happy Coding!!! šš»