Computer Sciences > Gate 2017 Set-2 > Complexity
Match the algorithms with their time complexities:

Algorithm Time Complexity
(P)Tower of Hanoi with n disks (i)θ(n2)
(Q)Binary Search given n sorted numbers (ii)θ(nlogn)
(R)Heap sort of n numbers at the worst case (iii)θ(2n)
(S)Addition of two n*n matrices (iv)θ(logn)
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)

Correct : Complexity

Similar Questions

Consider a complete binary tree where the left and the right subtrees of the root are max-heaps. The lower bound for the number of operations to convert the tre...
#50 MCQ
Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting n ( ≥ 2) numbers? In the recurr...
#81 MCQ
Assume that the algorithms considered here sort the input sequences in ascending order. If the input is already in ascending order, which of the following are T...
#109 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......