Match the algorithms with their time complexities:
(A) P-> (iii), Q -> (iv), R -> (i), S -> (ii)
(B) P-> (iv), Q -> (iii), R -> (i), S -> (ii)
(C) P-> (iii), Q -> (iv), R -> (ii), S -> (i)
(D) P-> (iv), Q -> (iii), R -> (ii), S -> (i)
Answer: (C)
Explanation:
- Tower of Hanoi – Ɵ(2n)
- Heap sort worst case – Ɵ(n log n)
- Binary Search – Ɵ(log n)
- Addition of two nxn matrices – Ɵ (n2)
Therefore Option (C) is correct