Skip to content

Commit ade7ce7

Browse files
committed
removed duplicates
1 parent 98081d9 commit ade7ce7

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

217.containsduplicate.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Solution:
2+
def ContainsDuplicate(self, nums):
3+
store = [ ]
4+
for num in nums:
5+
if num in store:
6+
return True
7+
else:
8+
store.append(num)
9+
10+
li = Solution( )
11+
print(li.ContainsDuplicate([ 2,3,4,5,6,6,7]))
12+

0 commit comments

Comments
 (0)