- 40 Algorithms Every Programmer Should Know
- Imran Ahmad
- 48字
- 2025-04-04 12:59:10
The Performance of Binary Search
Binary search is so named because at each iteration, the algorithm bifurcates the data into two parts. If the data has N items, it will take a maximum of O(logN) steps to iterate. This means that the algorithm has an O(logN) runtime.