An array 𝐴 of length 𝑛 with distinct elements is said to be bitonic if there…

PYQ GATE 2025

An array 𝐴 of length 𝑛 with distinct elements is said to be bitonic if there is an index 1 ≀ 𝑖 ≀ 𝑛 such that 𝐴[1. . 𝑖] is sorted in the non-decreasing order and 𝐴[𝑖 + 1 . . 𝑛] 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 𝐴?

  1. A.

    Θ(𝑛)

  2. B.

    Θ(1)

  3. C.

    Θ(log2𝑛)

  4. D.

    Θ(log 𝑛)

Attempted by 317 students.

Sign up free to check your answer

Sign up free

Explore the full course: Algorithms

Loading lesson…