To sort the list
which algorithm is faster?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Since this array is already in sorted order, Insertion Sort takes O ( n ) time. Mergesort takes O ( n l g n ) no matter the state of the input, and Quicksort takes O ( n l g n ) in its best case (when the input is already sorted).