Google-Developer-Student-Club-CCOEW / Competitive-Coding

7 stars 51 forks source link

Question 83 #195

Open JMukta25 opened 2 years ago

JMukta25 commented 2 years ago

An arcade game player wants to climb to the top of the leaderboard and track their ranking. The game uses [Dense Ranking], so its leaderboard works like this: The player with the highest score is ranked number on the leaderboard. Players who have equal scores receive the same ranking number, and the next player(s) receive the immediately following ranking number. ranked=[100,90,90,80] player=[70,80,105] The ranked players will have ranks 1,2, 2 and 3, respectively. If the player's scores are70 ,80 and 105, their rankings after each game are 4th, 3rd and1st. Return [4,3,1] Function Description int ranked[n]: the leaderboard scores int player[m]: the player's scores Returns int[m]: the player's rank after each new score Input Format Length of ranked Array Ranked Array Length of Player Array Player Array Input 1 7 100 100 50 40 40 20 10 4 5 25 50 120 Input 2 6 100 90 90 80 75 60 5 50 65 77 90 102

Shruti-78 commented 2 years ago

Shruti Koshti CCOEW SY, Comp I want to work on this issue.. can you assign it to me?

JMukta25 commented 2 years ago

I have assigned. Happy Coding!!