The problem focuses on identifying whether the array contains any duplicate element. If the same number occurs more than once, the answer should be true.
Example 1:
Input: nums = [1, 2, 3, 1]
Output: true
Explanation: The element 1 appears more than once in the array.
Example 2:
Input: nums = [1, 2, 3, 4]
Output: false
Explanation: All elements are distinct, so no duplicate exists.
Example 3:
Input: nums = [1, 1, 1, 3, 3, 4, 3, 2, 4, 2]
Output: true
Explanation: Multiple elements appear more than once, so the array contains duplicates.