fix: 修复quickSort4排序出错

This commit is contained in:
LouisFonda 2024-03-03 22:33:53 +08:00
parent 00f6a80ab1
commit 5e63701e3f

View File

@ -160,7 +160,7 @@ export function quickSort4(arr) {
stack.push(pivot - 1);
stack.push(l);
}
if (right > pivot + 1) {
if (r > pivot + 1) {
stack.push(r);
stack.push(pivot + 1);
}