home *** CD-ROM | disk | FTP | other *** search
- Path: castle.nando.net!news
- From: xyzzy@nando.net (Andy Philpotts)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Sorting a list
- Date: 23 Mar 1996 22:34:30 GMT
- Organization: Nando.net Public Access
- Message-ID: <722.6656T1045T1014@nando.net>
- References: <272.6650T63T1340@sn.no> <314F9F68.48E2@sapiens.com> <ZZNYYD.96Mar21121908@diku.dk>
- NNTP-Posting-Host: grail1011.nando.net
- X-Newsreader: THOR 2.22 (Amiga;TCP/IP)
-
-
- Finn Nielsen said:
- >I really hope you're just kidding here: bubble sort is the slowest sorting
- >algorithm ever. ALTO you're right about sorting the pointers instead of the
- >actual strings. I recommend using QuickSort for sorting the pointers and
- >natural merge sort if you're using linked lists...
-
- Actually, there are several slower algorithms, my favorite is to RANDOMLY
- permute the list until it happens to be sorted :-)
- If you want a fast "simple" sort the shell sort (named after a Dr Shell!) is
- probably good for relatively small lists.
-
-
- --
- Andy Philpotts (xyzzy@nando.net)
- --
- The use of COBOL cripples the mind; its teaching should, therefore, be
- regarded as a criminal offense.
- -- E. W. Dijkstra
-
-