Exam-style question
Try this first
A binary search checks the middle item of a current range. The target is greater than this item. Which part of the range should be searched next?.
- A.The lower half
- B.The upper half
- C.The entire original range
- D.Only the middle item again
Model answer
What a good answer should say
- The upper half
Explanation
Why this works
Because the values are ordered and the target is greater than the middle item, the target can only be in the upper half of the current range.
Common mistake
No common mistake is linked to this question yet.
