mirror of
https://github.com/chefyuan/algorithm-base.git
synced 2024-12-27 12:56:17 +00:00
Update leetcode1两数之和.md
This commit is contained in:
parent
9a8b4f47a4
commit
5908cad71b
@ -100,7 +100,7 @@ public:
|
||||
for (int i = 0; i < nums.size(); ++i) {
|
||||
int t = target - nums[i];
|
||||
if (m.count(t)) return { m[t], i };
|
||||
m[A[i]] = i;
|
||||
m[nums[i]] = i;
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user