Loading
Loading
Locate a value in a sorted array by halving the interval. Each comparison discards half of what remains, so a million elements take about twenty steps.
Use ← → to step, Space to play or pause, and the Input button to run it on your own data.