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?
- (A) An array of n integers in any order
- (B) A linked list of n integers in any order
- (C) An array of n integers in increasing order
- (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