You are viewing a single comment's thread. Return to all comments →
def climbingLeaderboard(ranked, player): org_rank = sorted(set(ranked), reverse=True) ans = [] rank_i = len(org_rank) - 1 for score in player: while rank_i >= 0 and score >= org_rank[rank_i]: rank_i -= 1 ans.append(rank_i + 2) return ans
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 →