You are viewing a single comment's thread. Return to all comments →
i get time out, can sombody help me:
vector<int> climbingLeaderboard(vector<int> ranked, vector<int> player) { vector<int> res; ranked.erase(unique(begin(ranked),end(ranked)),end(ranked)); int n=ranked.size(); for(int j: player){ for(int i=0; i<ranked.size();i++){ if(j>=ranked[i]){ res.push_back(i+1); break; } if(i==n-1) res.push_back(i+2); } } return res; }
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 →
i get time out, can sombody help me: