• + 4 comments

    I have another solution, I think It is also correct and eazy.

    def migratoryBirds(n, ar):
        m = [4,3,2,1,0]
        for b in ar:
            m[b-1] += 10
        return 5 - max(m) % 10