What is Binary Search Algorithm? (original) (raw)

Last Updated : 02 Mar, 2023

Binary Search is a searching algorithm used in a sorted array by repeatedly dividing the search interval in half and the correct interval to find is decided based on the searched value and the mid value of the interval.

Example of binary search

Example of binary search

Pre-requisites to apply Binary Search Algorithm:

For applying binary search in any data structure, the data structure must satisfy the following two conditions:

What else can you read?