Ready to Search
Step: 0
Comparisons: 0
Eliminated: 0
Middle = (LB + UB) ÷ 2 = (? + ?) ÷ 2 = ?
1. Set LB = 0, UB = array.length - 1
2. Calculate middle = (LB + UB) ÷ 2
3. Compare target with middle element
4. If equal: found! If less: UB = middle - 1
5. If greater: LB = middle + 1, repeat
Enter a target value and click "SEARCH STEP" to begin the binary search
Binary search eliminates half the remaining elements with each comparison!