devxlogo

January 13, 2003

SelectionSort – Short, simple and sloooow

‘ SelectionSort. Short, simple and sloooow. This is another O(N^2) sort that ‘ should never be used on long lists. Like InsertionSort,’ it needs no extra memory (in place) and

ShuttleMergeSort – An improved MergeSort

‘ 2/4/03. The previous version of ShuttleMergeSort failed on very short lists. ‘ The code below corrects the problem and eliminates a couple of unnecessary ‘ variables. Sorting times for

Ternary QuickSort – A modification of QuickSort

‘ Ternary QuickSort. See the summary of QuickSort for background before ‘ reading this one. Ternary QuickSort (also called MultiKey QuickSort) differs ‘ from the original QuickSort by examining keys