Hi Jasen,
JB>GW> Interestingly Professor Knuth does cover insertion sort (Shellsort)
JB>GW> before exchange sorts (Bubble sort).
JB>"Shell sort": how does that one work? (you needn't post code, a "5 line"
JB>description will do.) and why are you calling it "insertion sort" if it's
JB>better than qsort?
Sorry, the description in Knuth is such that I can't see a way to
condense it to 5 lines... :-( Maybe one of the better wordsmiths in here
can do it for you.
It's not "better than qsort()", in certain circumstances it's faster
than the basic quicksort algorithm, but with all the "tweaks" to the
algorithm applied, to get "quickersort", there are very few
circumstances where shellsort is faster than quickersort.
George
* SLMR 2.1a * Wastebasket: Something to throw things near.
--- Maximus/2 3.01
---------------
* Origin: DoNoR/2,Woking UK (44-1483-717905) (2:440/4)
|