You are viewing a single comment's thread. Return to all comments →
Python 3 solun using collections.Counter
from collections import Counter def migratoryBirds(arr): return min([bird for bird, count in Counter(arr).items() if count == max(Counter(arr).values())])
overall time complexity is O(N)
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 →
Python 3 solun using collections.Counter
overall time complexity is O(N)