Last Updated : 19 Nov, 2018

Match the List-1: Sorting algorithm with their List-II: best time complexity on input N.

List-I List-II
(a) Insertion sort (i) O(N log N)
(b) Quick sort (ii) O(N2)
(c) Heap sort (iii) O(N )
(d) Merge sort (iv) O(log N)

(A) (a) – (iii), (b) – (ii), (c) – (iv), (d) – (i)
(B) (a) – (iii), (b) – (i), (c) – (i), (d) – (iii)
(C) (a) – (iii), (b) – (ii), (c) – (i), (d) – (i)
(D) None of these


Answer: (C)

Explanation: Insertion sort takes O(n) time in best case.
Quick sort takes O(nlogn) time in best case.
Heap sort takes O(n) time in best case.
Merge sort takes O(nlogn) in best case.

So, option (C) is correct.

Quiz of this Question


Share your thoughts in the comments