You are viewing a single comment's thread. Return to all comments →
My logic is almost same, But this code is giving runtime error in test case 10. what can be the issue ?
def breakingRecords(score): min_1 = score[0] max_1 = score[0] min_brk = 0 max_brk = 0 if len(score) < 2: return 0 for i in range(len(score)): if (score[i] < min_1): min_brk += 1 min_1 = score[i] elif(score[i] > max_1): max_brk += 1 max_1 = score[i] else: max_brk = max_brk min_brk = min_brk i += 1 return(max_brk, min_brk)
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 →
My logic is almost same, But this code is giving runtime error in test case 10. what can be the issue ?