We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Climbing the Leaderboard
Climbing the Leaderboard
Sort by
recency
|
2342 Discussions
|
Please Login in order to post a comment
my solution:
https://github.com/Tusenka/hackerrank/blob/main/climbing_leaderboard.py
this is my go solution, some extra lines maybe buy very good performance.
I aimed to make the code traverse both lists only once, and this was the result. Any suggestions for improvement?
function climbingLeaderboard(ranked, player) { // Write your code here const leaderboard = Array.from(new Set(ranked)) const result = [] let index = leaderboard.length - 1 // Start from the lowest rank
} `