
上QQ阅读APP看书,第一时间看更新
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.