• + 1 comment

    def climbingLeaderboard(ranked, player): ranked = sorted(set(ranked),reverse=True) index = len(ranked) - 1 output = [] for i in player: while index >= 0 and i >= ranked[index]: index -= 1 output.append(index+2)
    return output