You are viewing a single comment's thread. Return to all comments →
def climbingLeaderboard(scores, alice): # Complete this function n=len(scores) levels=len(alice)
sl=list(set(scores)) sl.sort(reverse=True) for i in alice: flag= False sl.append(i) c=sl.count(i) if(c>1): flag= True ds=set(sl) sl=list(ds) sl.sort(reverse=True) Rank=sl.index(i) print(Rank+1) if(flag == True): pass else: sl.remove(i)
Question : How to get rid of timeout issue in the above code
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 →
def climbingLeaderboard(scores, alice): # Complete this function n=len(scores) levels=len(alice)
Question : How to get rid of timeout issue in the above code