GATE CS 2025 Set 2 | Question 41

Algorithms › Sorting & Searching · MCQ · 2 marks · Answer: D

  1. Question 41Algorithmsmcq2 marks
    An array of length with distinct elements is bitonic if is non-decreasing and is non-increasing for some . Which ONE is the best asymptotic bound for the worst-case number of comparisons to search for an element in a bitonic array?
    • A.
    • B.
    • C.
    • D.
      ✓

    Answer: D

    Solution

    Answer: (D) First find the peak index with binary search in . Then binary search the increasing part and the decreasing part, each . Total comparisons in the worst case.

More GATE PYQ on Sorting & Searching

All GATE CS Algorithms PYQ →

Attempt GATE CS 2025 Set 2 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →