Timsort, the Python sorting algorithm
skerritt.blog
Timsort, the Python sorting algorithm
1–10 of 135 posts
Re: Timsort, the Python sorting algorithm
#2Re: Timsort, the Python sorting algorithm
#3Re: Timsort, the Python sorting algorithm
#4If you're using another language, you might want to verify that the bug is fixed/not present in your library
[1] http://www.envisage-project.eu/proving-android-java-and-pyth...
Re: Timsort, the Python sorting algorithm
#5Re: Timsort, the Python sorting algorithm
#6Re: Timsort, the Python sorting algorithm
#7Note that Timsort uses O(n) extra space: sometimes this can be undesirable.
Re: Timsort, the Python sorting algorithm
#8Re: Timsort, the Python sorting algorithm
#9Re: Timsort, the Python sorting algorithm
#10Earlier quoted context omitted.
Note that this is true for any (edit: stable, nlogn) merge sort.
Not true in general, however IIRC it is the case if you want optimal (i.e. n log n) time complexity.
Stable sorts often do require that, (mergesort is usually stabble, heapsort and quicksort are inherently not), but even that's not required - there is a completely in-place variant of merge sort that only requires O(log n) space for stack (like quicksort; heapsort is O(1)). See e.g. https://xinok.wordpress.com/2014/08/17/in-place-merge-sort-d...