From 1dfd9f1395a28bf61fc0dc4f68c834d04d416773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=98=E5=B0=8F=E5=AE=89?= Date: Mon, 1 Sep 2025 17:48:14 +0800 Subject: [PATCH] =?UTF-8?q?add:=E6=B5=8B=E8=AF=95=E4=B8=80=E4=B8=8B=20rabb?= =?UTF-8?q?it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "228.\346\261\207\346\200\273\345\214\272\351\227\264.js" | 2 ++ 1 file changed, 2 insertions(+) diff --git "a/228.\346\261\207\346\200\273\345\214\272\351\227\264.js" "b/228.\346\261\207\346\200\273\345\214\272\351\227\264.js" index 451492e..2409dbd 100644 --- "a/228.\346\261\207\346\200\273\345\214\272\351\227\264.js" +++ "b/228.\346\261\207\346\200\273\345\214\272\351\227\264.js" @@ -19,6 +19,8 @@ var summaryRanges = function (nums) { temp.push(nums[i]) continue } + + // 判断当前是否连续 if (nums[i] == (temp[temp.length - 1] + 1)) { // 更新区间的右区间