Status: Tags: Links: Searching a sorted array
Binary Search
Principles
- Rounds up on odd lengths
Big O
T(N) = T(N/2) + O(1)
- T(N/2) since it reruns function on half of array
- If statements are O(1)
Solving O(1) is some constant, assume c=4
|
|
Examples
Backlinks
|
|
References:
Created:: 2021-10-17 16:31