Binary Search Algorithm
Introduction
Binary search is a fast algorithm used to find items in a sorted list.
Steps
- Find the middle element
- Compare with target
- Repeat on half of the list
Advantages
- Very efficient
- Works in O(log n)
- Widely used
Diagram
Learn more:
Click here