GATE Assistant

Past questions › Data Science and Artificial Intelligence › GATE 2025

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 in the worst case?

  1. (A)

    An array of integers in any order

  2. (B)

    A linked list of integers in any order

  3. (C)

    An array of integers in increasing order

  4. (D)

    A linked list of integers in increasing order

Show answer

Official answer: C

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion