GATE Computer Science (CS) 2017 Shift 2 Solved Paper

© examsiri.com
Question : 13 of 65
 
Marks: +1, -0
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)
Go to Question: