You are viewing a single comment's thread. Return to all comments →
what is the code of "count" function?? bcos when I am using loop instead of count fuction, its taking too much time to run. pls help??
I am using loop but it is the same thing with ar.count(max(ar))
def birthdayCakeCandles(n, ar):
for x in range(n):
for y in range(n):
if ar[y] == max_height:
Thanks Arxino sir but after I started to run the code it showed a runtime error. I was asking that this function has 2 parameters but when below when the function is called it has only 1 parameter(ar).
So what shall I do.
Actually I am 13 years old and a beginner for coding in python.
why did you used 2nd loop......i am not getting it can you please explain