AlgoScope

Interpolation Search

AlgorithmintermediateSearching

Probe where a straight line through the range ends would put the target; log log n on even data.

Decision · step 3 of 4Search Variants: Interpolation on even data
active 0-1110020130240350460570680790✓810091101012011lowprobehigh90 = 90

90 equals 90: found at index 8.

Open in the player →or start at step 3

What you will see

The probe lands near where the value "should" be instead of the middle.

How search variants works →

Cost

BestO(1)
AverageO(log log n)
WorstO(n)
SpaceO(1)

Average case assumes uniformly distributed keys.

How you work with it here

play it through, step one change at a time, scrub to any step, run it on your own input, predict what happens next.

Screen readers: Cells announce index, value and state (current, discarded, found); each step announces the comparison and the resulting range.

Reduced motion: Range and pointer changes snap into place with a short crossfade; discarded cells fade without movement.

Before this

Taught by the same lesson

Search Variants covers these too, in the same run.