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:
Yudong Jin
2023-04-17 18:22:18 +08:00
committed by GitHub
parent 28fdd26f2f
commit 881d573790
57 changed files with 265 additions and 505 deletions
@@ -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 {
@@ -2,7 +2,7 @@
// Created Time: 2022-12-05
// Author: Slone123c (274325721@qq.com)
package chapter_searching
package chapter_binary_search
import (
"fmt"
@@ -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 {
@@ -2,7 +2,7 @@
// Created Time: 2022-11-25
// Author: reanon (793584285@qq.com)
package chapter_computational_complexity
package chapter_searching
import (
"fmt"