Searching Studio

Binary Search

Repeatedly halve the search interval in a sorted array. Track mid pointers, range updates, and comparisons.

Inputs

Enter a sorted array (ascending) plus the target value.

The dataset will be auto-sorted for convenience before the search.

Trace

Each step shows the mid index and direction of the next search.

  1. Run the algorithm to populate steps.