C
CBFalconer
Jerry said:(e-mail address removed) says...
[ ... ]
The result is that for most cases quicksort will be the fastest
sort. Right behind it are other O(nLOGn) methods. I prefer
mergesort and data input in lists, because then I don't have to
worry about the size to be sorted. In addition, mergesort is
stable (quicksort is not).
The most common implementation of Quicksort for arrays is unstable
-- but a Quicksort on an array _can_ be written to be stable if
you want to badly enough, and for a linked list, it's quite easy
to make it stable.
Not so. Extending Quicksort to include multiple fields does not
count. Mergesort remains simple. For an example, look at the
usage examples in hashlib (on my site).