Math 2.0

Computer science Algorithms as mathematical objects Concept

Binary search

Summary

Binary search finds a target value in a sorted array. It compares the target with the middle element of the remaining range and discards the half that cannot contain it. On an array of nn elements it uses at most ⌊log⁡2n⌋+1\floor{\log_2 n} + 1 comparisons with array elements. It is the basic example of a logarithmic-time algorithm, and the same halving idea solves many search problems over monotone predicates.

Further reading

  1. Web https://en.wikipedia.org/wiki/Binary_search
About this page
TagV67H7YCQ17
URIm2://V67H7YCQ17
Kindconcept
WritingW0 stub
MSC68P10, 68W40
SpecializesAlgorithm
Same as
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Definitions