Return true when any value occurs at least twice in nums; otherwise return false.
Input / output
nums: integer[]Examples
[1,2,3,1] returns true.[1,2,3,4] returns false.Constraints
0 <= nums.length <= 100,000-1,000,000,000 <= nums[i] <= 1,000,000,000Follow-up Compare a hash set with sorting when memory is constrained or modifying the input is allowed.