• + 0 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