Binary search
Halve the range still in play at every step until the target is found or ruled out.
Values2, 5, 8, 12, 16, 23, 38, 56, 72, 91target 23
Search 2, 5, 8, 12, 16, 23, 38, 56, 72, 91 for 23. lo starts at index 0 and hi at index 9.
- compare
- swap or write
- settled
Space play · ← → step · Home End jump · drag the strip to scrub