# Problem Statement Given an integer array `nums`, return `true` if any value appears **at least twice** in the array, and return `false` if every element is distinct. ## Constraints - `1 <= nums.length <= ` $10^5$ # Solution We can compare the length of `nums` to the length of `set(nums)`. Since converting a list to a [[Python set]] will remove duplicates, if the lengths are different we know there was a duplicate. ```python return len(nums) != len(set(nums)) ``` Time Complexity: O$(n)$ | Space Complexity: $O(n)$