Skip to content
Related Articles

Related Articles

ISRO | ISRO CS 2013 | Question 12
  • Last Updated : 30 Apr, 2018

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

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :