• + 2 comments
    def climbingLeaderboard(ranked, player):
        # Write your code here
        rank = []
        for i in range(len(player)):
            ranked.append(player[i])
            transformed = sorted(set(ranked), reverse=True)
            rank.append(transformed.index(player[i]) + 1)
        return rank
    

    Not optimized