Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 566 Bytes

SEARCH.md

File metadata and controls

17 lines (13 loc) · 566 Bytes

Binary Search

Binary search, also known as half-interval search, logarithmic searchs, or binary chop, is a search algorithm that finds the position of a target value within a sorted array. Binary search compares the target value to the middle element of the array; if they are unequal, the half in which the target cannot lie is eliminated and the search continues on the remaining half until it is successful. If the search ends with the remaining half being empty, the target is not in the array.

Complexity

Time Complexity: O(logn) -

References