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.
2 parents 3997fa6 + 8fec7f1 commit 5034b9dCopy full SHA for 5034b9d
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