We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aa2c4e6 commit c21b311Copy full SHA for c21b311
3-linear-data-structures/ch07/7-3.py
@@ -11,4 +11,4 @@ def twoSum(self, nums: List[int], target: int) -> List[int]:
11
# 타겟에서 첫 번째 수를 뺀 결과를 키로 조회
12
for i, num in enumerate(nums):
13
if target - num in nums_map and i != nums_map[target - num]:
14
- return [nums.index(num), nums_map[target - num]]
+ return [i, nums_map[target - num]]
0 commit comments