Skip to content
Related Articles

Related Articles

Improve Article

ISRO | ISRO CS 2013 | Question 12

  • Last Updated : 30 Apr, 2018
Geek Week

Which of the following sorting algorithms has the minimum running time complexity in the best and average case?
(A) Insertion sort, Quick sort

(B) Quick sort, Quick sort
(C) Quick sort, Insertion sort
(D) Insertion sort, Insertion sort


Answer: (A)

Explanation: Insertion sort has a best case complexity of O(n), if the array is already sorted while it has an average case complexity of O(n2)
Quick sort has a best case complexity of O(n log n), while it has an average case complexity of O(n log n) also.
So, option (A) is correct.


Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :