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 7 in 2, 7, 15, 29, 38, 47, 54, 58, 64, 66, 68, 97?

2715293847545864666897
the answer, and why

the answer is B

Blocks of 3: 1 block end, then 2 places walked to 7, 3 looks.

if you chose another

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

new numbersthe test page's numbers

question 2

Jump search looks for 89 in 16, 60, 89, 89, 90, 91, 95. At which place does it stop?

16608989909195
the answer, and why

the answer is C

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

if you chose another

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

Jump search takes 6 looks for 6, 25, 32, 48, 54, 61, 66, 71, 73, 86; 73, 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 5 looks for this one, fewer than 6.

new numbersthe test page's numbers