Halving the Search Space
One key reason binary search is so efficient is that it halves the search space in each step. By eliminating half of the elements at each iteration, binary search greatly reduces the number of elements that need to be checked.
Why is Binary Search log n?
Binary search is a popular algorithm used to search for an element in a sorted list efficiently. In this article we can going to understand why binary search has a time complexity of O(log2 n).