Skip to content

Commit 5908cad

Browse files
authored
Update leetcode1两数之和.md
1 parent 9a8b4f4 commit 5908cad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

animation-simulation/数组篇/leetcode1两数之和.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public:
100100
for (int i = 0; i < nums.size(); ++i) {
101101
int t = target - nums[i];
102102
if (m.count(t)) return { m[t], i };
103-
m[A[i]] = i;
103+
m[nums[i]] = i;
104104
}
105105
return {};
106106
}

0 commit comments

Comments
 (0)