Jump Search
SearchingavgO(√n)worstO(√n)spaceO(1)
32
12
60
94
19
6
71
65
57
74
7
93
36
53
76
66
55
80
99
27
33
89
41
45
27
17
42
10
30
33
35
21
62
63
31
55
target 66
Jump search needs a sorted array…
1 / 17
Size36
Distribution
Custom values2 to 150 whole numbers, each 1 to 999
seed 12
Target
How it works
On a sorted array, jumps ahead √n elements at a time until it overshoots the target, then scans that one block linearly. It sits between linear and binary search, and it only ever moves forward.
Complexity
- Best
- O(1)
- Average
- O(√n)
- Worst
- O(√n)
- Space
- O(1)