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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,385be4c68a9e4de6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-07-11 07:41:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.mathworks.com!cyclone.swbell.net!bos-service1.ext.raytheon.com!dfw-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3D2D98DB.39944A80@despammed.com> From: Wes Groleau Reply-To: wesgroleau@despammed.com X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en,es-MX,es,pt,fr-CA,fr MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Smart sorting algorithm ? References: <3D21D581.6EF6CB06@despammed.com> <3D2A0A25.52A62B7C@despammed.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 11 Jul 2002 09:40:27 -0500 NNTP-Posting-Host: 151.168.144.162 X-Complaints-To: news@ext.ray.com X-Trace: dfw-service2.ext.raytheon.com 1026398461 151.168.144.162 (Thu, 11 Jul 2002 09:41:01 CDT) NNTP-Posting-Date: Thu, 11 Jul 2002 09:41:01 CDT Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:27006 Date: 2002-07-11T09:40:27-05:00 List-Id: > I mentioned earlier that you should investigate non-comparison-based > sorting. If you can easily create a lookup table, then you should easily be > able to create such a sorting algorithm. O(n) and O(1) comparison sorting > is possible under special circumstances... The lookup table is created by doing the comparisons. And predicting some comparisons from others. Once that's done, the row with the N "this is first" entries is first. Second is the row with N-1, etc. But the whole process still involves some comparisons. -- Wes Groleau http://freepages.rootsweb.com/~wgroleau