You are viewing a single comment's thread. Return to all comments →
ive written a similar one but this code is solving only 11/15 cases. for n>1000 its not able to solve.idk why
def breakingRecords(scores): p=q=scores[0] g=l=0 for i in scores: if(i>p): p=i g=g+1 if(i<q): q=i l=l+1 g=str(g) l=str(l) z=[g,l] return(''.join(z))
Seems like cookies are disabled on this browser, please enable them to open this website
Breaking the Records
You are viewing a single comment's thread. Return to all comments →
ive written a similar one but this code is solving only 11/15 cases. for n>1000 its not able to solve.idk why