Skip to content
Related Articles

Related Articles

Improve Article
Algorithms | InsertionSort | Question 2
  • Difficulty Level : Basic
  • Last Updated : 24 Jun, 2016

Which is the correct order of the following algorithms with respect to their time Complexity in the best case ?
(A) Merge sort > Quick sort >Insertion sort > selection sort
(B) insertion sort < Quick sort < Merge sort < selection sort
(C) Merge sort > selection sort > quick sort > insertion sort
(D) Merge sort > Quick sort > selection sort > insertion sort


Answer: (B)

Explanation:

In best case, 

Quick sort: O (nlogn) 
Merge sort: O (nlogn)
Insertion sort: O (n)
Selection sort: O (n^2)  


Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :