Skip to content

Commit 99d51dd

Browse files
authored
Update Two Sum - Leetcode 1.py
1 parent 74e6b56 commit 99d51dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Two Sum - Leetcode 1/Two Sum - Leetcode 1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def twoSum(self, nums: List[int], target: int) -> List[int]:
4141
h = {}
4242
n = len(nums)
4343
for i, x in enumerate(nums):
44-
y = target - nums[i]
44+
y = target - x
4545
if y in h:
4646
return [i, h[y]]
4747
else:

0 commit comments

Comments
 (0)