mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-26 11:06:28 +08:00
Update the test
This commit is contained in:
parent
4a31f909c6
commit
45aca03b92
1 changed files with 4 additions and 4 deletions
|
@ -33,10 +33,10 @@ function twoSumHashTable(nums: number[], target: number): number[] {
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Driver Code */
|
/* Driver Code */
|
||||||
let nums = [2, 7, 11, 15]
|
let nums = [2, 7, 11, 15], target = 9;
|
||||||
twoSumBruteForce(nums, 9)
|
twoSumBruteForce(nums, target)
|
||||||
console.log("使用暴力枚举后得到结果:", nums)
|
console.log("使用暴力枚举后得到结果:", nums)
|
||||||
|
|
||||||
let nums1 = [2, 7, 11, 15]
|
let nums1 = [2, 7, 11, 15], target1 = 9;
|
||||||
twoSumHashTable(nums1, 9)
|
twoSumHashTable(nums1, target1)
|
||||||
console.log("使用辅助哈希表后得到结果", nums1)
|
console.log("使用辅助哈希表后得到结果", nums1)
|
Loading…
Reference in a new issue