What is the fastest way to sort an array of whole integers bigger than 0 and less than 100000 in Python? But not using the built in functions like sort.
Im looking at th
Early versions of Python used a hybrid of samplesort
(a variant of quicksort with large sample size) and binary insertion sort as the built-in sorting algorithm. This proved to be somewhat unstable. S0, from python 2.3 onward uses adaptive mergesort
algorithm.
Order of mergesort (average) = O(nlogn)
.
Order of mergesort (worst) = O(nlogn)
.
But Order of quick sort (worst) = n*2
if you uses list=[ .............. ]
list.sort()
uses mergesort algorithm.
For comparison between sorting algorithm you can read wiki
For detail comparison comp