We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
n_arr = []
for i in set(arr):
k = 0
for j in arr:
if i == j:
k += 1
n_arr.append((i, k))
m = max([i[1] for i in n_arr if i[1]])
return min([i[0] for i in n_arr if i[1] >= m])
Cookie support is required to access HackerRank
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 →
// couldn't find better 1 at the time
def migratoryBirds(arr):