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)) { // 更新区间的右区间