One Line Python


  • 0
    S

    Notice that there must be only one MOST_COMMON majority element

    return collections.Counter(nums).most_common(1)[0][0]
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.