You are viewing a single comment's thread. Return to all comments →
python , simple and straightforward
def climbingLeaderboard(ranked, player): # Write your code here ranked = sorted(set(ranked), reverse=True)
results = [] l = len(ranked) for score in player: print(l) while (l > 0) and (score >= ranked[l - 1]): l -= 1 results.append(l + 1) return results
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 →
python , simple and straightforward
def climbingLeaderboard(ranked, player): # Write your code here ranked = sorted(set(ranked), reverse=True)