GATEverse
← GATE CSE 2017 Set 2

Q03

MCQ1 mark, −0.33

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$ disks} & \text{i. $\Theta (n^2)$} \\\hline \text{Q. Binary Search given $n$ sorted numbers} & \text{ii. $\Theta (n \log n)$} \\\hline \text{R. Heap sort given $n$ numbers at the worst case} & \text{iii. $\Theta (2^n)$} \\\hline \text{S. Addition of two $n\times n$ matrices} & \text{iv. $\Theta (\log n)$} \\\hline \end{array}
Sign in to save attempts.

Loading…