Skip to content

Commit b1a43ea

Browse files
committed
Runtime: 92 ms (Top 43.48%) | Memory: 41.8 MB (Top 59.42%)
1 parent 58f2756 commit b1a43ea

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
// Runtime: 92 ms (Top 43.48%) | Memory: 41.8 MB (Top 59.42%)
12
var maxChunksToSorted = function(arr) {
23
let count = 0, cumSum = 0;
34
arr.forEach((el, index) => {
45
cumSum += el-index;
56
if (cumSum === 0) count++;
67
});
78
return count;
8-
};
9+
};

0 commit comments

Comments
 (0)