Given an integer array nums, check if any number appears two or more times.
Return true if some number is repeated. Return false if all the numbers are different.
Examples
Example 1:
Input: nums = [4,9,2,9,6]
Output: true
Explanation: The number 9 appears twice.
Example 2:
Input: nums = [10,20,30,40]
Output: false
Explanation: All numbers are different.
Example 3:
Input: nums = [-1,0,-1]
Output: true
Explanation: The number -1 appears twice.