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 698c2b6 commit bc4865cCopy full SHA for bc4865c
contains-duplicate/deepInTheWoodz.py
@@ -1,9 +1,8 @@
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
- s.add(num)
8
- return False
9
-
+class Solution:
+ def containsDuplicate(self, nums: List[int]) -> bool:
+ s = set()
+ for num in nums:
+ if num in s:
+ return True
+ s.add(num)
+ return False
0 commit comments