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 3997fa6 commit 8fec7f1Copy full SHA for 8fec7f1
217-Contains-Duplicate.py
@@ -0,0 +1,5 @@
1
+class Solution:
2
+ def containsDuplicate(self, nums: List[int]) -> bool:
3
+ length=len(nums)
4
+ nums[:]=sorted(nums)
5
+ return any(nums[i]==nums[i+1] for i in range(length-1))
0 commit comments