SproutStackSproutStack home

Binary Search (visual)

Halve the suspects every step.

Teaching this in the lesson? Read the chapter.

Step 1 of 3

1. mid

l=0 r=n-1, m=(l+r)/2.

  1. Check the middle

Prefer prose? Every animation has a matching chapter, listed above. Diagrams use text labels, so they read aloud with the listen button on the lesson page.