mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-13 04:10:58 +00:00
Refactor the articles related to searching algorithm. Add the chapter of binary search. Add the section of searching algorithm revisited. (#464)
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Created Time: 2022-12-05
|
||||
// Author: Slone123c (274325721@qq.com)
|
||||
|
||||
package chapter_searching
|
||||
package chapter_binary_search
|
||||
|
||||
/* 二分查找(双闭区间) */
|
||||
func binarySearch(nums []int, target int) int {
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Created Time: 2022-12-05
|
||||
// Author: Slone123c (274325721@qq.com)
|
||||
|
||||
package chapter_searching
|
||||
package chapter_binary_search
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Created Time: 2022-11-25
|
||||
// Author: reanon (793584285@qq.com)
|
||||
|
||||
package chapter_computational_complexity
|
||||
package chapter_searching
|
||||
|
||||
/* 方法一:暴力枚举 */
|
||||
func twoSumBruteForce(nums []int, target int) []int {
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
// Created Time: 2022-11-25
|
||||
// Author: reanon (793584285@qq.com)
|
||||
|
||||
package chapter_computational_complexity
|
||||
package chapter_searching
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
Reference in New Issue
Block a user