You are viewing a single comment's thread. Return to all comments →
Why do you need the map? What is wrong with:
def build_bird_freq(arr: list): bird_freq = [0, 0, 0, 0, 0, 0] for i in range(len(arr)): bird_freq[arr[i]] += 1 return bird_freq.index(max(bird_freq))
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 →
Why do you need the map? What is wrong with: