Algorithm Lab · 01

Binary Search Drawers

The drawers are sorted from 1 to 12. Compare the target with the midpoint, discard the impossible half, and repeat.

Low 1
High 12
Mid 6
Left 12
Remaining candidate interval [1, 12] · 12 candidates
Low
High
Midpoint
Comparison trace
DRAG TO ORBIT · SCROLL TO ZOOM · CLICK A DRAWER
Ready Choose a target, then halve the remaining candidate interval.