Sorting linked lists

Chris Torek chris at umcp-cs.UUCP
Thu Mar 20 20:26:33 AEST 1986


In article <6721 at cca.UUCP> g-rh at cca.UUCP (Richard Harter) writes:
[in response to my heap sort]

>A simpler method, given qsort with a compare function as an
>argument, is to create an array of pointers to the nodes
[and sort through the pointers].

Indeed you can; I was simply trying to avoid using extra space.
(And I had a lot of fun writing my first ever heap sort.)

Personally, I like the merge sort in article <402 at mips.UUCP> by
hansen at mips.  Maybe I will convert that one next.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 1415)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at mimsy.umd.edu



More information about the Comp.lang.c mailing list