Link to home
Start Free TrialLog in
Avatar of pete420
pete420

asked on

Quick Sort problem

i have a quick sort program which outputs the numbers in a correct sequence, but the problem is that any value that is used as a pivot during the working out process is omitted from the output.
I am unsure how to get this into the correct order

SOURCE CODE @----> http://www.newwavesound.co.uk/java

thanks

pete

Avatar of petmagdy
petmagdy
Flag of Canada image

try to replace the line:

>>                if (currentValue.compareTo(pivot) > 0)
with
                if (currentValue.compareTo(pivot) >= 0)
ASKER CERTIFIED SOLUTION
Avatar of petmagdy
petmagdy
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial