Skip to content

Commit 9d9bfa6

Browse files
committed
add: contains-duplicate problem solved
1 parent a1685a6 commit 9d9bfa6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

contains-duplicate/JiHyeonSu.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# 중복제거 후 길이 확인 문제
2+
# 시간복잡도 및 공간복잡도 O(n)
3+
class Solution:
4+
def containsDuplicate(self, nums: List[int]) -> bool:
5+
return len(nums) != len(set(nums))

0 commit comments

Comments
 (0)