To search for a target element in a bitonic array of size n:
Find the peak (maximum element) index i: Using a modified binary search, compare the middle element with its neighbors to determine whether the peak lies to the left or to the right. This takes O(logn) comparisons.
Search the two monotonic halves:
Perform standard binary search on the increasing subarray A[1…i], which takes O(logn) comparisons.
Perform descending binary search on the decreasing subarray A[i+1…n], which takes O(logn) comparisons.
The total worst-case number of comparisons is:
T(n)=O(logn)+O(logn)+O(logn)=Θ(logn) Since searching in an array of n elements has an information-theoretic lower bound of Ω(logn) comparisons, Θ(logn) is the optimal asymptotic bound.
Therefore, option D is correct.