Loading...
Given an integer array nums, return True if any value appears at least twice in the array, and False if every element is distinct.
1,2,3,1
True
[1, 2, 3, 1]1, we realize it's a duplicate, since we've seen it before: 1∈[1,2,3]True, indicating that the array contains at least one value that appears twiceTrue