TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ALEX WALKER
from: CAMERON CLARK
date: 1997-11-29 20:22:00
subject: Re: Sorting small arrays?

AW>      With an array of this size, does it really matter what sort
AW>      algorithm I use?  Wouldn't the dreaded Bubble sort give similar
AW>      performance to other algorithms, (evne if repeated 100 times)?
    For small amounts of data, most sort algorithms are the same.
    As data increases, bubble/selection sort grows exponentially.
    As data increases, quick/merge sort grows only log base 2 of N.
    (where N is the number of data items)
    As data increases, Hashing takes 3 probes (as long as the table
    is about 20% empty) then hashing will be as productive as a
    linear sorting algorithm.
--- GEcho 1.00
---------------
* Origin: Digital OnLine Magazine! - (409)838-8237 (1:3811/350)

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