Migratory Birds

  • + 0 comments

    Python 1 liner: O(N)

    return max(Counter(arr).items(), key= lambda i: 10*i[1] + 5-i[0])[0]