You are viewing a single comment's thread. Return to all comments →
frequency = {} for i in arr: frequency[i] = frequency.get(i,0) + 1 maxCount = 0 bird = None for key, values in frequency.items(): if values > maxCount: maxCount = values bird = key if values == maxCount and key < bird: bird = key return bird
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 →