1 line in Python


  • 14
    E
    return len(set(nums)) < len(nums)
    

    It's not optimal solution (64 ms), however it simple and clear.


Log in to reply
 

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