A little issues
Well,I think,maybe we should use '<' instead in line 26 as your code situation...
This commit is contained in:
parent
1e8a82ebef
commit
9cc8cd42b5
@ -23,7 +23,7 @@ function partition(arr, start, end) {
|
||||
let i = start;
|
||||
let pivot = arr[end];
|
||||
for (let j = start; j < end; j++) {
|
||||
if (arr[j] > pivot) {
|
||||
if (arr[j] < pivot) {
|
||||
swap(arr, i, j);
|
||||
i += 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user