[NeetCode] Duplicate Integer
NeetCode synced attempts for Duplicate Integer.
Tags: algorithms, neetcode, python
Categories: NeetCode
- Problem
- Synced automatically from
devbattery/neetcode-submissions
Notes
Write your own notes here. This section is preserved across syncs.
Attempts
Attempt 1 ยท 2026-04-21 ยท Python
class Solution:
def hasDuplicate(self, nums: List[int]) -> bool:
return len(set(nums)) != len(nums)
Leave a comment