0 votes
8 views

Which of the following operations can be performed in $O(logn)$ time or faster on a sorted array $A$?($n$ denotes the size of array)

1. Search$(A, x)$
2. Find-Minimum$(A)$
3. Delete$(A, x)$

Choose the correct option

1. A, B & C
2. B & C
3. A & B
4. A & C
in Others | 8 views

## 1 Answer

0 votes
A will take logn time using binary search.
B is O(1), as the array given is sorted.
C is O(n), as even though we can find the element in O(logn), we’ll have to move all the other elements after deletion.
by (364 points)