|
Subject: Aw: Re: [stella] Bubble Sort From: cybergoth@xxxxxxxx Date: Tue, 26 Mar 2002 11:13:50 +0100 (MET) |
Hi Thomas!
> I'm still 100% sure that this algorithm will NOT work.
Hm... :-)
> Example: 3 2 1
> - tempVar1 starts with 1 (#MAXOBJECTS-2)
> - after the first outer loop you get: 1 3 2
Actually, I get 3 2 1, as it already is perfetly sorted :-)
If you sort the other way round, you get it,
> - then tempVar1 is decreased to 0
> - in the next (and last) outer loop, the inner loop will only
> compare 1 and 3,
even with your sort order reversed, since it'll compare
3 & 2 and swap them. Done :-)
> Make your demo a little bit slower, then it might be easier to
> spot the sorting errors. And with slower movement, it's also
> much easier to evaluate flicker.
There are errors, but they're not from the sorting, but
from the 'conflict' detection. I already spotted some errors
in there, which are yet to be corrected.
Greetings,
Manuel
-----------------------------------------------------------------------
Riester-Rente - Kassieren Sie das Geld vom Staat:
Zum Förderungsrechner! http://www.arcor.de/home/redir.php/riesterrente
-----------------------------------------------------------------------
----------------------------------------------------------------------------------------------
Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [stella] Bubble Sort (ps), Ronald A. Laski, Jr. | Thread | Aw: Re: [stella] Bubble Sort II, cybergoth |
| [stella] Bubble Sort (ps), Ronald A. Laski, Jr. | Date | Re: [stella] Bubble Sort II, Thomas Jentzsch |
| Month |