Skip to content

Searching algorithms

↑

Linear search works without sorted input. Binary search repeatedly halves an indexed sorted range. Compare preconditions, time complexity and memory before choosing either algorithm.

Start with one concept, work through a small example, and verify your prediction. Follow linked topics when a prerequisite or related idea needs more explanation.