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 f551b03 commit 12e62d0Copy full SHA for 12e62d0
1 file changed
contains-duplicate/hyeri0903.py
@@ -0,0 +1,13 @@
1
+class Solution:
2
+ def containsDuplicate(self, nums: List[int]) -> bool:
3
+ ans = False
4
+ dic = dict()
5
+
6
+ for n in nums:
7
+ if n in dic:
8
+ return True
9
+ else:
10
+ dic[n] = 1
11
+ return ans
12
13
0 commit comments