Binary search

Binary search locates a target in an ordered collection by repeatedly eliminating half of the remaining search interval. It can also determine that the target is absent.

Connect