From 26e211c79289ddab9b749b0a493ce77611b7603a Mon Sep 17 00:00:00 2001 From: yigencong Date: Sat, 24 Feb 2024 15:18:51 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=8E=BB=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sort/insertion-sort.mjs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sort/insertion-sort.mjs b/sort/insertion-sort.mjs index ab9f233..1885a02 100644 --- a/sort/insertion-sort.mjs +++ b/sort/insertion-sort.mjs @@ -1,5 +1,9 @@ import { generateRandomArray, isSort } from "../util/index.mjs"; +/** + * 插ε…₯ζŽ’εΊ + * @param {number[]} arr + */ export function insertionSort(arr){ let n = arr.length; for (let i = 1; i