You are viewing a single comment's thread. Return to all comments →
I am using loop but it is the same thing with ar.count(max(ar))
def birthdayCakeCandles(n, ar): max_height=0 double=0 for x in range(n): if ar[x]>max_height: max_height=ar[x] for y in range(n): if ar[y] == max_height: double+=1 return double
Seems like cookies are disabled on this browser, please enable them to open this website
Birthday Cake Candles
You are viewing a single comment's thread. Return to all comments →
I am using loop but it is the same thing with ar.count(max(ar))