查找
Data Structures & Algorithms · 2 notes
- 3.8 Binary Searchhistorical
Binary search compares a target with the middle element of a sorted array, then continues in the left or right half to narrow the search.
- 3.10 Linear Searchhistorical
Linear search compares array elements one by one, returning the target's index or -1 if it is absent. The notes include a Go implementation and test examples.