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 42 in 18, 21, 28, 32, 38, 42, 55, 77, 90. At which place is its second look?
the answer, and why
the answer is A
The first look is at the middle, place 5, which holds 38. 42 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
B42 stands at place 6, but the second look lands at place 7, before 42 is reached.
CPlace 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 42 is bigger than 38.