You are viewing a single comment's thread. Return to all comments →
def migratoryBirds(arr): numberOfBirdTypes = {1:0, 2:0, 3:0, 4:0, 5:0} for birdType in arr: numberOfBirdTypes[birdType] += 1 highestNumberBirdType = 0 highestNumber = -1 for birdType, num in numberOfBirdTypes.items(): if num > highestNumber: highestNumberBirdType = birdType highestNumber = num return highestNumberBirdType
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 →
Python3 Solution