Skip to content

Commit c21b311

Browse files
authored
onlybooks#39 Improve the readability and more productive.
1 parent aa2c4e6 commit c21b311

File tree

1 file changed

+1
-1
lines changed
  • 3-linear-data-structures/ch07

1 file changed

+1
-1
lines changed

3-linear-data-structures/ch07/7-3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ def twoSum(self, nums: List[int], target: int) -> List[int]:
1111
# 타겟에서 첫 번째 수를 뺀 결과를 키로 조회
1212
for i, num in enumerate(nums):
1313
if target - num in nums_map and i != nums_map[target - num]:
14-
return [nums.index(num), nums_map[target - num]]
14+
return [i, nums_map[target - num]]

0 commit comments

Comments
 (0)