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 31ad063 commit 0a3b42aCopy full SHA for 0a3b42a
1 file changed
contains-duplicate/mandel-17.py
@@ -0,0 +1,13 @@
1
+from typing import List
2
+
3
+class Solution:
4
+ def containsDuplicate(self, nums: List[int]) -> bool:
5
+ stack_list = []
6
+ for i, n in enumerate(nums[:-1]):
7
+ stack_list.append(n)
8
+ if nums[i+1] in stack_list:
9
+ return True
10
+ else:
11
+ if i == len(nums[:-2]):
12
+ return False
13
+ continue
0 commit comments