You are viewing a single comment's thread. Return to all comments →
n = int(input().strip()) ar = list(map(int, input().strip().split(' '))) a = ar.count(1) b = ar.count(2) c = ar.count(3) d = ar.count(4) e = ar.count(5) li=[a,b,c,d,e] print(1+li.index(max(li)))
what is the Time Complexity of this code?
Seems like cookies are disabled on this browser, please enable them to open this website
Migratory Birds
You are viewing a single comment's thread. Return to all comments →
what is the Time Complexity of this code?