Hello Alex!
(Wednesday 26-11-1997 at 01:12) Alex Walker wrote in message to All:
AW> I'm a student, learning C++ and as part of my homework I'm doing
AW> a small program that sorts a small array of data (only 8 elements).
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)?
AW> So far I think I'll use the Selection Sort. But if there is one
AW> algorithm that shines when used on small arrays, please let me
ow.
I think, it isn't matter what kind of sorts you'll be using, absolute!
Because, you have too little amount of elements. In your situation will be
better to use that algorithm, which have the shorter code. (e.g. staight
selection sort)
Leonid Butenko
--- GoldED/W32 3.00a4+
---------------
* Origin: This is invisible string. (FidoNet 2:5023/9.25)
|