AlgoViz

Jump Search

Jump Search works on sorted arrays by jumping ahead by fixed steps and then performing linear search in the identified block.

IntermediateTime: O(√n)Space: O(1)
64
34
25
12
22
11
90
45
67
33
Speed1x

Current Step

Press Play to start the visualization


## How Jump Search Works

Jump Search is a searching algorithm for sorted arrays. It works by jumping ahead by fixed steps and then performing a linear search once the block containing the target is found.

### Algorithm Steps:
1. Calculate the optimal jump size: √n
2. Jump ahead by this size until finding a value >= target
3. Perform linear search in the identified block
4. Return the index if found, -1 otherwise

### Key Characteristics:
- **Requires sorted array**: Must be sorted before searching
- **Block-based**: Divides array into blocks of size √n
- **Optimal jump size**: √n provides the best balance
- **Better than linear**: O(√n) vs O(n) for linear search

Time & Space Complexity

CaseTime Complexity
BestO(1)
AverageO(√n)
WorstO(√n)
SpaceO(1)

Practice Problems

No Problems Available

Practice problems for this algorithm are coming soon!