Skip to content

Commit 0faaeae

Browse files
author
jinbeom
committed
Refactor Contains Duplicate
1 parent f23c237 commit 0faaeae

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

contains-duplicate/kayden.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
# 공간복잡도: O(N)
33
class Solution:
44
def containsDuplicate(self, nums: List[int]) -> bool:
5-
unique_nums = set(nums)
6-
return len(unique_nums) != len(nums)
5+
return len(set(nums)) != len(nums)

0 commit comments

Comments
 (0)