Let A be a sorted array containing \(1000\) distinct integers. You perform a recursive binary search on \(\text{A}\) to find an element \(\text{y}\). Suppose each comparison checks whether the middle element computed during the current recursive step is equal to, less than, or greater than \(\text{y}\). The maximum number of comparisons that may have to be performed if \(\text{y}\) is not an element of \(A\) is . (Answer in integer)
GATE DA 2026 · Linear Search & Binary Search
Solve it on GATE DA practice →More Searching & Sorting Algorithms problems