Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!olivea!samsung!crackers!jjmhome!smds!rh From: rh@smds.UUCP (Richard Harter) Newsgroups: comp.lang.c Subject: Re: Sorting Double Linked List in place Summary: If you like qsort, use it Message-ID: <231@smds.UUCP> Date: 10 Nov 90 07:46:22 GMT References: <1990Nov7.160701.5838@bkj386.uucp> <1930@necisa.ho.necisa.oz> Organization: SMDS Inc., Concord, MA Lines: 20 In article <1930@necisa.ho.necisa.oz>, boyd@necisa.ho.necisa.oz (Boyd Roberts) writes: > 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). > What about a bubble sort? Masochistic, aren't we. :-) If the man wants qsort, use it. (Complaints about the inferiority of qsort to mergesort may be filed with the Ministry of Love, room 101.) If one has a qsort routine the modifications to use doubly linked lists instead of array indices are pretty simple. -- Richard Harter, Software Maintenance and Development Systems, Inc. Net address: jjmhome!smds!rh Phone: 508-369-7398 US Mail: SMDS Inc., PO Box 555, Concord MA 01742 This sentence no verb. This sentence short. This signature done.