We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25c4666 commit 3bfd34aCopy full SHA for 3bfd34a
contains-duplicate/deepInTheWoodz.py
@@ -0,0 +1,9 @@
1
+class Solution:
2
+ def containsDuplicate(self, nums: List[int]) -> bool:
3
+ s = set()
4
+ for num in nums:
5
+ if num in s:
6
+ return True
7
+ else:
8
+ s.add(num)
9
+ return False
0 commit comments