Skip to content

Commit 31bbf1d

Browse files
committed
Time: 544 ms (72.05%), Space: 33.5 MB (15.96%) - LeetHub
1 parent 702592e commit 31bbf1d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution:
2+
def containsDuplicate(self, nums: List[int]) -> bool:
3+
hset={}
4+
for i in nums:
5+
if i in hset:
6+
return True
7+
hset[i]=1
8+
return False

0 commit comments

Comments
 (0)