Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2017 Set 2
Questions

Q03

MCQ1 mark, −0.33AlgorithmsEasy

Match the algorithms with their time complexities:

AlgorithmsTime ComplexityP. Tower of Hanoi with n disksi. Θ(n2)Q. Binary Search given n sorted numbersii. Θ(nlog⁡n)R. Heap sort given n numbers at the worst caseiii. Θ(2n)S. Addition of two n×n matricesiv. Θ(log⁡n)\begin{array}{|l|l|}\hline \textbf{Algorithms} & \textbf{Time Complexity} \\\hline \text{P. Tower of Hanoi with }{n}\text{ disks} & \text{i. }{\Theta (n^2)} \\\hline \text{Q. Binary Search given }{n}\text{ sorted numbers} & \text{ii. }{\Theta (n \log n)} \\\hline \text{R. Heap sort given }{n}\text{ numbers at the worst case} & \text{iii. }{\Theta (2^n)} \\\hline \text{S. Addition of two }{n\times n}\text{ matrices} & \text{iv. }{\Theta (\log n)} \\\hline \end{array}
Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.