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 85 in 25, 44, 54, 57, 70, 74, 81, 85, 89, 91, 92, 93?

254454577074818589919293
the answer, and why

the answer is A

Blocks of 3: 3 block ends, then 2 places walked to 85, 5 looks.

if you chose another

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

new numbersthe test page's numbers

question 2

Jump search looks for 37 in 4, 19, 37, 37, 72, 74, 93. At which place does it stop?

4193737727493
the answer, and why

the answer is B

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

if you chose another

  • Place 4 is where 37 is first seen, as block 2's end. The walk then starts at place 3.
  • Place 2 holds 19, 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 A

Jump search takes 5 looks for 7, 16, 42, 48, 52, 57, 70, 71, 76, 89; 57, the most of the four.

if you chose another

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

new numbersthe test page's numbers