×
☰ Menu

Binary Search Algorithm 

Binary search is a type of search that works well with sorted lists. To use the binary search strategy to find an element in a list, we must first confirm that the list is sorted.


The divide and conquer strategy are used in binary search, in which the list is divided into two halves and the item is compared to the list's middle element. The location of the middle element is returned if a match is discovered. Otherwise, depending on the outcome of the match, we search into one of the halves or the other.

Working of Binary search