Skip to content

Commit 480b937

Browse files
committed
feat: add contains duplicate solution
1 parent ee1ad8e commit 480b937

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

contains-duplicate/dm.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from typing import List
2+
3+
4+
class Solution:
5+
def containsDuplicate(self, nums: List[int]) -> bool:
6+
return len(nums) != len(set(nums))

0 commit comments

Comments
 (0)