home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6081 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

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