• + 0 comments

    Python3

    def migratoryBirds(arr):
        
        theCounter = [0,0,0,0,0] # It is guaranteed that each type is in 1-5
        
        for i in arr:
            theCounter[i - 1] += 1
    
    return theCounter.index(max(theCounter))+1