Merge pull request #2531 from NicolasLeigh/NicolasLi2-patch-1

Update 0001.两数之和.md
This commit is contained in:
程序员Carl 2024-05-13 10:58:25 +08:00 committed by GitHub
commit 3f2d0c413f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -349,6 +349,7 @@ function twoSum(nums: number[], target: number): number[] {
index = helperMap.get(target - nums[i]);
if (index !== undefined) {
resArr = [i, index];
break;
}
helperMap.set(nums[i], i);
}