GATE CS 2025, set 2 · Question 41 · Algorithms · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer

An array A of length n with distinct elements is said to be bitonic if there is an index 1 ≤ i ≤ n such that A[1..i] is sorted in the non-decreasing order and A[i+1..n] is sorted in the non-increasing order.
Which ONE of the following represents the best possible asymptotic bound for the worst-case number of comparisons by an algorithm that searches for an element in a bitonic array A?

  1. (A) Θ(n)
  2. (B) Θ(1)
  3. (C) Θ(log² n)
  4. (D) Θ(log n)
Answer

Answer (D)

Answer from the official GATE CS 2025 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes