You are viewing a single comment's thread. Return to all comments →
# Write your code here ranked_score = sorted(list(set(ranked)), reverse=True) arr = [] for player_score in player: left, right = 0, len(ranked_score) while left < right: mid = (left + right) // 2 if ranked_score[mid] > player_score: left = mid + 1 else: right = mid arr.append(left + 1) return arr
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Climbing the Leaderboard
You are viewing a single comment's thread. Return to all comments →