Write the algorithm to search an element in a given sorted array using binary search
Answers
Answered by
22
Answer:
Search a sorted array by repeatedly dividing the search interval in half. Begin with an interval covering the whole array. If the value of the search key is less than the item in the middle of the interval, narrow the interval to the lower half. Otherwise narrow it to the upper half.
Similar questions