Binary Search

Binary Search is a searching algorithm for finding an element’s position, if it exists, in a sorted array.

Implementation

Complexity

Time Complexities

Space Complexity

The space complexity of the binary search is O(1).