[Solved] Time Complexity of Binary Search?
With binary search you typically search in a sorted random access data structure like an array, by discarding half of the array with each comparison. Hence, in k steps you effectively cover 2^k entries. This yields a complexity of at most log2(n) of n elements. With landau symbols, the base of the logarithm disappears because … Read more