Jump Search vs Exponential Search

Across our 4 test inputs, Jump Search needed 21 comparisons in total versus 25 for Exponential Search. On average Jump Search runs in O(√n) time and Exponential Search in O(log n).

Head-to-head on identical inputs (comparisons)

InputJump SearchExponential Search
Target is first21
Target in the middle47
Target is last89
Target absent78

Complexity

Jump SearchExponential Search
Average timeO(√n)O(log n)
Worst timeO(√n)O(log n)
SpaceO(1)O(1)
StableNoNo

When to use Jump Search

Sorted data where jumping backwards is expensive (e.g. linked storage or tape-like media).

When to use Exponential Search

Unbounded or very large sorted lists, or when the target is likely near the start.