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 78 in 5, 21, 24, 39, 49, 50, 71, 78, 79, 86, 88, 91?

52124394950717879868891
the answer, and why

the answer is A

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

if you chose another

  • 78 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 78, before it reaches 79 again.

new numbersthe test page's numbers

question 2

Jump search looks for 60 in 37, 45, 60, 60, 65, 66, 82. At which place does it stop?

37456060656682
the answer, and why

the answer is A

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

if you chose another

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

Jump search takes 6 looks for 19, 37, 38, 64, 67, 70, 80, 84, 85, 87; 85, the most of the four.

if you chose another

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

new numbersthe test page's numbers