Binary Search Algorithm
What is Binary Search?
Binary search is an efficient algorithm for finding an item from a sorted list of elements.
Steps of Binary Search
- Find the middle element of the list.
- If it's the target, return it.
- If the target is less, search the left half. Otherwise, search the right half.
Visual Representation
Want to learn more? Visit
Wikipedia - Binary Search.