Skip to content

Commit

Permalink
Update the test
Browse files Browse the repository at this point in the history
  • Loading branch information
gyt95 committed Dec 15, 2022
1 parent 4a31f90 commit 45aca03
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ function twoSumHashTable(nums: number[], target: number): number[] {
};

/* Driver Code */
let nums = [2, 7, 11, 15]
twoSumBruteForce(nums, 9)
let nums = [2, 7, 11, 15], target = 9;
twoSumBruteForce(nums, target)
console.log("使用暴力枚举后得到结果:", nums)

let nums1 = [2, 7, 11, 15]
twoSumHashTable(nums1, 9)
let nums1 = [2, 7, 11, 15], target1 = 9;
twoSumHashTable(nums1, target1)
console.log("使用辅助哈希表后得到结果", nums1)

0 comments on commit 45aca03

Please sign in to comment.