Also called Half-interval search and Logarithmic 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 binary search's own run on the numbers shown.
choose one
1question 1
Binary search looks for 95 in 5, 10, 15, 17, 19, 34, 45, 53, 95. At which place is its second look?
the answer, and why
the answer is C
The first look is at the middle, place 5, which holds 19. 95 is bigger, so places 6 to 9 are left. Their middles are places 7 and 8, and it takes the first.
if you chose another
A95 stands at place 9, but the second look lands at place 7, before 95 is reached.
BPlace 8 is the second of the two middles. This binary search takes the first.
DPlace 3 is in the half the first look ruled out, since 95 is bigger than 19.