

MCQOPTIONS
Saved Bookmarks
1. |
Match the algorithms with their time complexities: Algorithm Time complexity(P)Towers of Hanoi with n disks(i)Θ (n2)(Q)Binary search given n sorted numbers(ii)Θ (n log n)(R)Heap sort given n numbers at the worst case(iii)Θ (2n)(S)Addition of two n × n matrices(iv)Θ (log n) |
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» D. P – (iv), Q – (iii), R – (ii), S – (i) | |