In a message dated 04-02-98, Jonathan de Boyne Pollard said to David Noon
about Sorting Linked List
Hi Jonathan,
JP>I'd hardly class Merge Sort as a "minor variant of Quick
JP>Sort". First, Merge Sort predates Quick Sort. And second,
JP>Merge Sort operates in the opposite direction to Quick Sort
JP>(as Sedgewick says, the latter is "conquer and divide",
JP>whilst the former is "divide and conquer").
My face in the mirror is a "minor variant" of my face. The recursions are
moved to the top so that sequential access is possible below.
JP>The above notwithstanding, I don't see how Merge Sort is any more
JP>appropriate for linked lists than Quick Sort.
Since you have a copy of Sedgewick, see pages 166-168.
I plan on posting a C++ template of that puppy too, once I have built a
suitable linked list class to sort.
Regards
Dave
___
* MR/2 2.25 #353 * Pan the Avenger is back!
--- Maximus/2 3.01
---------------
* Origin: DoNoR/2,Woking UK (44-1483-717905) (2:440/4)
|