An ordered list of 18 elements is stored in a one-dimensional array A[1..18] (1-based indexing). You perform standard binary search for the element at position A[3].
Assuming that at each step the middle index is computed as mid = floor((low + high) / 2), what is the sequence of indices examined during the search for A[3]?
Options:
1, 2, 3
9, 5, 3
9, 5, 2, 3
9, 4, 2, 3
Login required