GATE 2025 · DA · MSQ · 1 mark · Programming, Data Structures and Algorithms › Searching
GATE 2025 Data Science and Artificial Intelligence question: For which of the following inputs does binary search take time O(log n) in the worst case?
For which of the following inputs does binary search take time O(logn) 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
Show answer
Official answer: C
Practise this question with exam-style marking