Hackerrank | Migratory birds

def migratoryBirds(arr):
    count = [0] * len(arr)
    for i in arr:
        count[i]  += 1
    return(count.index(max(count)))

Comments

Popular posts from this blog

HackerRank | Organizing Containers of Balls

Geek for geeks | Reverse words in a given string

Hackerrank | Sequence Equation