[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: scrambler one-liner

Michael Campbell

9/18/2003 2:04:00 AM


--- Jason Creighton <androflux@softhome.net.remove.to.reply> wrote:
> On Wed, 17 Sep 2003 23:02:38 +0900
> Michael Campbell <michael_s_campbell@yahoo.com> wrote:
>
> > > [Jason Creighon]:
> > > ....but I don't know what evil effects having the comparison be
> > > random will have on a sorting algorithm.
> >
> > Isn't that the point here?
>
> What I meant was I don't know what evil effects have the comparison
> being *volitile* will have on a sorting algorithm.

...

> .....but I could be totally wrong here.

No, you're right, but as was mentioned earlier, *some* bubble sorts
use the "no swap done" as the ONLY end condition, though to be fair,
when I studied such things, I don't ever remember seeing one that
did; all I'd ever seen were ones that bubbled through the list n-1
times, and optimized an additional, early end condition of "no swap done".

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder...