Find the number of leaps you need to take to find an element in an array using the jump search algorithm.
For example,
a=[ 2,5,6,9,12,14,15,16,17,19,31]
To find 16 with a jump step of 3, you follow, 2 -> 9 -> 15 -> 19 -> 17 -> 16
So, total number of jumps = 5
nb. to go forward, you take n-step jump; to go backwards, you jump only one step back.
  • If the jump step is larger than the array size, u jump to the last element of the array.

Solution Stats

31 Solutions

8 Solvers

Last Solution submitted on Dec 15, 2025

Last 200 Solutions

Problem Comments

Solution Comments

Show comments
Loading...