JdBP>>> Whenever I need to code a sort of my own (as opposed to just using
JdBP>>> qsort()) I use Comb Sort. It's reasonably fast, and it is
JdBP>>> uncomplicated and small enough that it is easy to remember.
MB>> what is the comb sort?
JdBP> Comb sort is a variation on bubble sort that doesn't sort adjacent
JdBP> elements,
JdBP> but instead traverses the array using a progressively narrower gap
JdBP> width
JdBP> between compared elements. The authors likened it to combing the
array
JdBP> with a
JdBP> set of combs with progressively finer teeth.
now this is an interesting thing. It's like to be told for a long time
that Prolog can do jobs in 4 lines that C would do in 100, and not
being shown the more traditional languages that do the job in 10 but
are way easier than both of the previous (no, BASIC is none of them).
Except that this is with sorts, monolithic sorts vs. divide-and-conquer
sorts. It brings some freshness into the monolithic sorts camp. Yet
another example is my recent discovery of yet another old thing called
completion -- like command name completion or filename completion... in
commandline interfaces such as Bash, Emacs, or Gdb. For many hobbyists
this is a recent discovery (since free Unix is growing in popularity).
Those who think cmdline is crap only have used DOS (or older Unix
programs, in which case it's even worse)
matju
--- Terminate 4.00
---------------
* Origin: The Lost Remains Of SatelliteSoft BBS (1:163/215.42)
|