Skip to content

Commit 3253330

Browse files
committed
Fixed off-by-one error
1 parent e6f81b0 commit 3253330

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/algorithms/sorting/quickSort/threeWayPartitioning/QuickSort.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ private static int[] partition(int[] arr, int start, int end) {
113113
ipEnd--;
114114
}
115115
}
116-
int[] result = {eqStart - 1, eqEnd}; //return
116+
int[] result = {eqStart - 1, eqEnd + 1};
117117
return result;
118118
} else {
119119
return null;

0 commit comments

Comments
 (0)