TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: JONATHAN DE BOYNE POLLAR
from: DAVID NOON
date: 1998-03-17 16:43:00
subject: Sort Algorithm

On Monday, 98/03/09, Jonathan de Boyne Pollard wrote to David Noon about
"Sort Algorithm" as follows:
JP>  DN> I'm not sure what Jonathan meant by 'comb sort', but I _think_ he
JP>  DN> means Donald Shell's algorithm. 
JP> 
JP> No.  Combsort is a variant on Bubble sort.  
Hi Jonathan,
Yes, but it's closer to Shell's algorithm in its strategy.
Since you now have my function template for Shell's algorithm, you might
care to give it a try. The version I posted is not O(n**2), but O(n**1.5), so
it should be significantly quicker than Combsort as the array size increases.
To all:
I have not seen anybody posting any benchmarks, as I suggested, nor any
revised version of the Quicksort template. Doesn't anybody else here want to
write code, but simply want to use the code written by others?
JP>  DN> Note that Hoare's algorithm is the one used by the qsort() 
ubroutine
JP>  DN> of the Standard C Library. 
JP> 
JP> Note that it is wrong to assume this.  (-:
JP> 
JP> The C Standard says *nothing* about which algorithm qsort() 
JP> may use.  It merely requires that it sort the elements of 
JP> the array.  A C implementation could use Bubble sort and 
JP> still remain conforming.
In that case, it is "misleading advertising". That's nothing new in the
software business, though. ... :-(
Regards
Dave

 * KWQ/2 1.2i * Newbie: (n) someone who thinks RTFM is a 4-letter word.
--- 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™.