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)
|