VISUALGO//SEARCH
binary search · array trace console · O(log n)
Goal:Find 7 in a sorted array by repeatedly halving the search range. Grayed sections are eliminated.
3
04
17
216
329
431
549
652
761
866
980
1099
11▲
LOW▲
HIGHELEMENTS
TARGET
READOUT
step0 / 4
comparisons0
result—
statusIDLE