GATE DA 2025 · Question 27 · Programming, Data Structures and Algorithms · Multiple select (MSQ) · 1 mark · no negative marks

For which of the following inputs does binary search take time O(log n) in the worst case?

  1. (A) An array of n integers in any order
  2. (B) A linked list of n integers in any order
  3. (C) An array of n integers in increasing order
  4. (D) A linked list of n integers in increasing order
Answer

Answer (C)

Answer from the official GATE DA 2025 answer key.

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