You are on page 1of 1

Binary search is a searching algorithm that is used to find the position of a target value

within a sorted array. The algorithm works by repeatedly dividing the search interval in half
and comparing the middle element of the search space with the target value. If the middle
element is equal to the target value, the search is complete. If the target value is less than the
middle element, the search continues on the lower half of the search space. If the target value
is greater than the middle element, the search continues on the upper half of the search
space. This process is repeated until the target value is found or the search space is exhausted

You might also like