Check whether the array contains at least one duplicate value.
Example 1
Input: nums = [1,2,3,1]
Output: True
Explanation: The number 1 appears at least twice.
Output: True
Explanation: The number 1 appears at least twice.
Example 2
Input: nums = [1,2,3,4]
Output: False
Explanation: All values are distinct; there are no duplicates.
Output: False
Explanation: All values are distinct; there are no duplicates.