Skip to content

Commit 76823e3

Browse files
committed
feat: week1-remove space
1 parent bd23824 commit 76823e3

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

โ€Žcontains-duplicate/Seoya0512.pyโ€Ž

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@
1313
- ์ค‘๋ณต์„ ์ œ๊ฑฐํ•œ ์›์†Œ๋“ค์ด ์ƒˆ๋กœ์šด ์ง‘ํ•ฉ(set)์— ์ €์žฅ๋˜๋ฏ€๋กœ,
1414
์ตœ๋Œ€ nums์˜ ํฌ๊ธฐ๋งŒํผ ์ถ”๊ฐ€ ๊ณต๊ฐ„์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค.
1515
'''
16-
1716
class Solution:
1817
def containsDuplicate(self, nums: List[int]) -> bool:
1918
if len(nums) != len(set(nums)):
2019
return True
2120
else:
22-
return False
23-
21+
return False

โ€Žtwo-sum/Seoya0512.pyโ€Ž

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def twoSum(self, nums: List[int], target: int) -> List[int]:
2020
if (xnum + nums[jdx]) == target:
2121
return [idx, jdx]
2222
return []
23-
23+
2424
'''
2525
(๊ฐœ์„ )
2626
Approach:
@@ -44,6 +44,4 @@ def twoSum(self, nums: List[int], target: int) -> List[int]:
4444
diff = target - num
4545
if diff in hash_map:
4646
return [hash_map[diff], i]
47-
hash_map[num] = i
48-
49-
47+
hash_map[num] = i

0 commit comments

Comments
ย (0)