DN> Note that bubble sort is offered by Knuth, and several others, as by
DN> far the worst sorting algorithm around. The next step up is insertion
DN> sort, which typically runs twice as fast. The "great all-rounder" is
DN> Shell's algorithm. The "formula 1 racer" is Hoare's algorithm
DN> (usually very fast, but is prone to breaking down). The "status
DN> symbol" of sorting is Batcher's algorithm.
Whenever I need to code a sort of my own (as opposed to just using qsort()) I
use Comb Sort. It's reasonably fast, and it is uncomplicated and small
enough that it is easy to remember.
¯ JdeBP ®
--- FleetStreet 1.19 NR
---------------
* Origin: JdeBP's point, using Squish (2:440/4.3)
|