Which one of the following sorting algorithms will have the
Which one of the following sorting algorithms will have the best best-case running time?
Selection sort
Insertion sort
Heap sort
Quick sort
Solution
Insertion sort is the sorting algorithm which will have the best best-case running time among these.
Best case running time of insertion sort is O(n).
Best case running time of selection sort is O(n^2).
Best case running time of heap sort is O(n log(n)).
Best case running time of quick sort is O(n log(n)).
