DSAverse
Searching Algorithms
Loading Searching Algorithms...
Search Visualization
Initializing Sorting Algorithms...
Sorting
Trees
Graphs
Preparing interactive visualizations...
Searching Algorithms
Loading Searching Algorithms...
Search Visualization
A two-phase algorithm: exponential range-finding followed by binary search. Ideal for unbounded arrays.
Press Play to start the visualization.
Exponential search works in two phases. Phase 1 doubles a bound (1, 2, 4, 8, 16...) until the array element at that position is greater than or equal to the target. Phase 2 runs binary search within the found range [bound/2, min(bound, n-1)].
This algorithm shines for unbounded or infinite arrays because you never need to know the array size — just find a range first, then search within it.
What does the first phase (exponential scan) of exponential search accomplish?