AlgoScope

Exponential Search

AlgorithmintermediateSearching

Double the probe index until the value passes the target, then binary search the last doubling: O(log i).

Decision · step 2 of 9Search Variants: Doubling to a target near the front
active 0-1103✓1427394125156187228279311036114012441349145315probe3 < 9

Index 1 holds 3, below 9: double the bound to 2.

Open in the player →or start at step 2

What you will see

Probes at 1, 2, 4, 8, ...; then a binary search inside the last doubling.

How search variants works →

Cost

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

i is the target's position.

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.