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 67949d5 commit decee37Copy full SHA for decee37
contains-duplicate/hodaessi.py
@@ -0,0 +1,10 @@
1
+from typing import List
2
+
3
+class Solution:
4
+ def containsDuplicate(self, nums: List[int]) -> bool:
5
+ dict = {}
6
+ for num in nums:
7
+ dict[num] = dict.get(num, 0) + 1
8
+ if dict[num] > 1:
9
+ return True
10
+ return False
0 commit comments