Problem
Given an integer arraynums, return true if any value appears at least twice in the array, and return false if every element is distinct.
Examples
Constraints
- 1 <= nums.length <= 10^5
- -10^9 <= nums[i] <= 10^9
Tested Python solution for LeetCode 217 with 12 pytest cases. Generate a practice environment with lcpy.
nums, return true if any value appears at least twice in the array, and return false if every element is distinct.