Skip to content

Jump search

finding

Level 2 of 3

Also called Block search.

fresh numbers

The test's questions that a run answers, asked again on new numbers whenever you like. The answer, its working and the reason for every other choice come from jump search's own run on the numbers shown.

choose one

question 1

How many looks does jump search take to find 77 in 2, 3, 9, 11, 12, 31, 35, 37, 54, 63, 77, 92?

239111231353754637792
the answer, and why

the answer is B

Blocks of 3: 4 block ends, then 2 places walked to 77, 6 looks.

if you chose another

  • 77 stands at place 11. That is linear search's count, one look a place.
  • That counts the block ends alone. The walk adds 2.
  • The walk stops at 77, before it reaches 92 again.

new numbersthe test page's numbers

question 2

Jump search looks for 17 in 9, 15, 17, 17, 38, 73, 94. At which place does it stop?

9151717387394
the answer, and why

the answer is B

Blocks of 2. Block 1's end, 15, is smaller. Block 2's end, at place 4, is 17, not smaller, so the walk starts at place 3 and finds the first 17 there.

if you chose another

  • Place 4 is where 17 is first seen, as block 2's end. The walk then starts at place 3.
  • Place 2 holds 15, smaller, so its block is passed.
  • The search never gets to place 7.

new numbersthe test page's numbers

question 3

Which search costs jump search the most looks? Each option is a row, then, after the semicolon, the number wanted.

the answer, and why

the answer is D

Jump search takes 6 looks for 3, 19, 36, 42, 45, 50, 53, 83, 85, 86; 85, the most of the four.

if you chose another

  • Jump search takes 4 looks for this one, fewer than 6.
  • Jump search takes 5 looks for this one, fewer than 6.
  • Jump search takes 4 looks for this one, fewer than 6.

new numbersthe test page's numbers