FLUKE?

From: Christopher Smith <csmith_at_amdocs.com>
Date: Mon Dec 3 15:09:22 2001

> -----Original Message-----
> From: Dave McGuire [mailto:mcguire_at_neurotica.com]

> The "bubble sort" is a classic sorting algorithm. That's probably
> the algorithm the programmer used to sort the list of files.

By way of description Standish says in "Data Structure Techniques:"

"Let A[1:n] be an array of n numbers.

...

Make repeated sweeps over the array A[1:n] from left to right. Upon
detecting any adjacent pair of numbers A[i] and A[i+1] not in proper order,
exchange them A[i] <-> A[i + 1]. When a pass is completed with no exchanges
having been made, the process terminates.

"

I believe it's called bubble sort because the lesser numerical values tend
to "bubble up" to the top of the array.

Regards,

Chris


Christopher Smith, Perl Developer
Amdocs - Champaign, IL

/usr/bin/perl -e '
print((~"\x95\xc4\xe3"^"Just Another Perl Hacker.")."\x08!\n");
'
 
Received on Mon Dec 03 2001 - 15:09:22 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:33:37 BST