TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: JASEN BETTS
from: GEORGE WHITE
date: 1998-04-16 08:43:00
subject: Best sort algorithm [2/4

Hi Jasen,
You wrote to Herman:
JB>I'm not fully satisfied with it, as it will jumble up elements with the 
same
JB>key value (this is not noticeable here) , I would prefer it to keep them 
n
JB>their original order, I know there's a tweak to do this, I just can't 
hink
JB>what it is.
There is no way round this that I know of with quicksort, or Shell sort
and Comb sort. None will maintain existing ordering and so are
unsuitable for multiple key sorts. In those cases using a fast sort
(one of the above) for the first key, followed by an insertion or
selection (but not the selection sort using exchanges posted by Tom and
Herman as a fast bubble sort) sort for subsequent key(s) is probably
best.
George
 * SLMR 2.1a * Wastebasket: Something to throw things near.
--- Maximus/2 3.01
---------------
* Origin: DoNoR/2,Woking UK (44-1483-717905) (2:440/4)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.