1
GATE AI 2025
MCQ (More than One Correct Answer)
+1
-0

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
2
GATE AI 2025
MCQ (More than One Correct Answer)
+1
-0
Suppose that insertion sort is applied to the array $[1,3,5,7,9,11, x, 15,13]$ and it takes exactly two swaps to sort the array. Select all possible values of $x$.
A
10
B
12
C
14
D
16