Multiple choice

A _______ locates an item by repeatedly dividing a list in half and examining the middle element until the target value is found.

  1. bubble sort

  2. binary search

  3. sequential search

  4. merge sort

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Binary search works by repeatedly dividing the sorted list in half and examining the middle element. If the middle element is the target, the search ends. Otherwise, the search continues in the half where the target must exist. This makes binary search extremely efficient for large datasets.