bug fix
This commit is contained in:
@@ -19,7 +19,7 @@ public class QuickSorterThreeWay extends QuickSorter{
|
|||||||
int greaterThan = highIndex;
|
int greaterThan = highIndex;
|
||||||
int i = greaterThan-1;
|
int i = greaterThan-1;
|
||||||
while(i>lessThan){
|
while(i>lessThan){
|
||||||
int comp = compare(pivot, numbers[i]);
|
int comp = compare(numbers[i], pivot);
|
||||||
if(comp>0){
|
if(comp>0){
|
||||||
swap(i, greaterThan);
|
swap(i, greaterThan);
|
||||||
i--;
|
i--;
|
||||||
|
|||||||
Reference in New Issue
Block a user