From 5e63701e3f9c4115c9475a2bc106151e7a50410c Mon Sep 17 00:00:00 2001 From: yigencong Date: Sun, 3 Mar 2024 22:33:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DquickSort4=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=E5=87=BA=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sort/quick-sort.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sort/quick-sort.mjs b/sort/quick-sort.mjs index c0b5dd4..f644e04 100644 --- a/sort/quick-sort.mjs +++ b/sort/quick-sort.mjs @@ -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); }