fix: 修复quickSort4排序出错
This commit is contained in:
parent
00f6a80ab1
commit
5e63701e3f
@ -160,7 +160,7 @@ export function quickSort4(arr) {
|
|||||||
stack.push(pivot - 1);
|
stack.push(pivot - 1);
|
||||||
stack.push(l);
|
stack.push(l);
|
||||||
}
|
}
|
||||||
if (right > pivot + 1) {
|
if (r > pivot + 1) {
|
||||||
stack.push(r);
|
stack.push(r);
|
||||||
stack.push(pivot + 1);
|
stack.push(pivot + 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user