Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!gatech!udel!haven!adm!cmcl2!kramden.acf.nyu.edu!brnstnd From: brnstnd@kramden.acf.nyu.edu (Dan Bernstein) Newsgroups: comp.lang.c Subject: Re: Sorting Double Linked List in place Message-ID: <7319:Nov1009:20:5690@kramden.acf.nyu.edu> Date: 10 Nov 90 09:20:56 GMT References: <1990Nov7.160701.5838@bkj386.uucp> Organization: IR Lines: 12 In article <1990Nov7.160701.5838@bkj386.uucp> anton@analsyn.UUCP (PUT YOUR NAME HERE) writes: > I'm looking for a routine to sort a double linked list in place, > given the head of the list and a compare function for the elements > (sort of like qsort). [ .. ] > Knuth doesn't seem to help on this one> Everything that Knuth says about tape sorting is directly applicable here. You have a bit more freedom in memory use, but you won't find a noticeably more efficient algorithm. ---Dan