Posted by Jason D. Burkert on August 06, 1999 at 09:15:56:
In Reply to: Re: Quicksort Comps posted by Xero on August 05, 1999 at 21:45:16:
: : In your partiton function, are you counting the comparison that occurs when a the two while loops do not execute (ie array[++l] < pivot is false) etc etc...
: I've got the incrementer IN those while statements. So ... I guess I HAVEN'T accounted for when they're false. Would I just put another increment statement within that do-while, but separate from the while's? Or would it go outside the do-while? Or what? lol ... damn, all I have left is touching up my graphs, and of course, this will AFFECT them lol.
: Thanks
I suggest writing a function such as greaterThan(int, int) and putting that in your sorts. Do your incrementing in that function. All of my numbers were very similar to the example output with this method (after I found every place where I typed 1 instead of i). Hehe.