We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
score_rank = []
for k in player:
ranked.append(k)
temp_score = sorted(ranked, reverse=True)
ranks = {}
current = 1
ranks[temp_score[0]] = current
for i in range(1,len(temp_score)):
if temp_score[i] != temp_score[i-1]:
current += 1
ranks[temp_score[i]] = current
score_rank.append(ranks[k])
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Climbing the Leaderboard
You are viewing a single comment's thread. Return to all comments →
def climbingLeaderboard(ranked, player):