mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 21:24:53 +08:00
1. Add C++ codes for the chapter of
computational complexity, sorting, searching. 2. Corrected some mistakes. 3. Update README.
This commit is contained in:
@ -16,9 +16,8 @@ func TestTwoSum(t *testing.T) {
|
||||
// ====== Driver Code ======
|
||||
// 方法一:暴力解法
|
||||
res := twoSumBruteForce(nums, target)
|
||||
t.Log("brute force:", res)
|
||||
|
||||
t.Log("方法一 res =", res)
|
||||
// 方法二:哈希表
|
||||
res = twoSumHashTable(nums, target)
|
||||
t.Log("hash table:", res)
|
||||
t.Log("方法二 res =", res)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user