Binary search is an effective approach for retrieving an item from a sorted list of elements. It works by periodically dividing the portion of the list that might hold the item in half until only one location remains.
To implement the Binary Search algorithm:
There are two basic techniques to implement the Binary Search Algorithm in Data Structures:
The space complexity, or O(1), of Binary Search is constant since no appreciable additional memory is used.