Skip to content

Commit 9cc8cd4

Browse files
authored
A little issues
Well,I think,maybe we should use '<' instead in line 26 as your code situation...
1 parent 1e8a82e commit 9cc8cd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

javascript/12_sorts/KthNum.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function partition(arr, start, end) {
2323
let i = start;
2424
let pivot = arr[end];
2525
for (let j = start; j < end; j++) {
26-
if (arr[j] > pivot) {
26+
if (arr[j] < pivot) {
2727
swap(arr, i, j);
2828
i += 1;
2929
}

0 commit comments

Comments
 (0)