You are viewing a single comment's thread. Return to all comments →
not passing time limit
function climbingLeaderboard(ranked, player) { let ans = []; let unique = [...new Set(ranked)]; for (let i = 0; i < player.length; i++) { unique.push(player[i]); unique.sort((a,b) => b-a); ans.push(unique.indexOf(player[i]) + 1); } return ans; }
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 →
not passing time limit