TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: BRIAN WOOD
from: CAREY BLOODWORTH
date: 1998-01-22 21:24:00
subject: SORT ALGORITHM

BW> TM> If you think that bubble sort is a good sorting algorithm, I  have  
o
BW> TM> object.
BW>If you have a better one, then why not share it?  For the price of a few
BW>lines, I thought it was a very interesting example.  Below is the way I
Because for most situations, a sort algorithm isn't worth posting.  The
standard library quick sort routine will be quite adequate for 99.9% of
all C/C++ programs.
For those situations that aren't, you generally need to do a bit of
research, rather than just picking a sort routine out of a collection of
them.  You'll have choices ranging from modified bubble sorts, quick
sorts, insertion sorts, radix sorts, heap sorts, postman sorts, to merge
sorts, to comb sorts, to several more I can't think of.  But usually, a
simple bubble sort or qsort is quite adequite.  (Yes, there really are
situations where the simpler modified bubble sort is actually faster
than some library qsort() routines!  Not many, but there are some.)
Posting sort algorithms are some what academic.  Sure, it's 'fun' to
look at, and I'm not saying they aren't worth posting.  Just usually
there isn't much point in using them.  (I was going to suggest that you
check the C snippets collection, but it turns out that even it only has
a couple.)
--- QScan/PCB v1.19b / 01-0162
---------------
* Origin: Jackalope Junction 501-785-5381 Ft Smith AR (1:3822/1)

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™.