Detailed Analysis of the Binary Search As established in cs1, the best-case running time of a binary search of n elements is O(1), corresponding to when we find the element for which we are looking on our first comparisonSubtracting the bottom equation from the top, we get the following
|