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)).

Which one of the following sorting algorithms will have the best best-case running time? Selection sort Insertion sort Heap sort Quick sortSolutionInsertion sor

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site