Update leetcode1两数之和.md

pull/12/head
lucifer 2021-04-26 14:55:44 +08:00 committed by GitHub
parent 9a8b4f47a4
commit 5908cad71b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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 {};
}