Answer:
4, 8 and 12
Step-by-step explanation:
Given
Required
Elements that would be found by examining 2 or fewer numbers
To do this, we apply the following binary search algorithm
at 0-index
at 14-index
Calculate the mid-index
The mid-element (at 7th index) is:
The element at the mid-index is found by just 1 comparison
For 2 comparisons, we search in either directions
For the lower half, the new head and tail are:
---- at 0-index
at 6-index
Calculate the mid-index
The mid-element (at 3rd index) is:
For the upper half, the new head and tail are:
---- at 8-index
at 14-index
Calculate the mid-index
The mid-element (at 11th index) is:
The elements at the mid-index of both halves is found by 2 comparisons
Hence, the numbers are: