Labs / Computer Science

Binary Search Visualizer

Drag across the sorted bars to pick a target, then step or auto-run the search. Each step checks the middle of the live window and throws away the half that cannot contain the target — so a list of a thousand items is found in about ten comparisons.

compares 0window [0, 0]linear 0⌈log₂n⌉ 5

What to try