From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cda33fc7f63c2885 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-09 12:52:53 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3C3CAD9C.F7881E7F@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: list strawman References: <7iE_7.8661$cD4.15714@www.newsranger.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 09 Jan 2002 20:52:59 GMT NNTP-Posting-Host: 209.86.204.164 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 1010609579 209.86.204.164 (Wed, 09 Jan 2002 12:52:59 PST) NNTP-Posting-Date: Wed, 09 Jan 2002 12:52:59 PST Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Wed, 09 Jan 2002 12:52:53 PST (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:18706 Date: 2002-01-09T20:52:59+00:00 List-Id: Ted Dennison wrote: > > The sort used will probably be Quicksort too (yes, I know that's not your > point). I would suggest merge sort. Merge sort is O(N log N) worst case in time, and well suited to sorting a list. Because a list already has the "Next" pointers in each node, merge sort, which is usually described as being O(N) in space, is O(1) in space for a list. O(N log N) worst case in time seems better than the O(N**2) worst case in time you get from Quick Sort. -- Jeff Carter "Death awaits you all, with nasty, big, pointy teeth!" Monty Python & the Holy Grail