SORTING. Dan Barrish-Flood. heapsort. made file “3-Sorting-Intro-Heapsort.ppt”. Quicksort. Worst-case running time is Θ(n 2 ) on an input array of n numbers. Expected running time is Θ( n lg n ). Constants hidden by Θ are quite small. Sorts in place.
1 fori← 1 to d
2 do use a stable sort to sort array A on digit i