You are viewing a single comment's thread. Return to all comments →
python 3 solution working backwards to find idx
updated_ranked = sorted(list(set(ranked)), reverse=True) result = [] idx = len(updated_ranked) - 1 for p in player: while True: if updated_ranked[idx] > p: result.append(idx+2) break elif idx == 0: result.append(1) break else: idx = idx - 1 return result
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 3 solution working backwards to find idx