Programming Thread

Viewing single post

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

darkknightkryta

It's starting with a clean state every time.  But half the time it keeps counting even though it shouldn't.  

There's nothing in it that depends on time or randomness, so it doesn't make a lot of sense.  

Every time it comes to the wrong value, it's because it is adding up another value that it shouldn't even be reaching.

Like I'm passing in an array of 10 values, but half the time it adds an 11th value that seems to come out of nowhere.
At least your while loop based quick sort isn't bugging out when a zero is on the right side.