1var maxChunksToSorted = function (arr) {2 let count = 0,3 cumSum = 0;4 arr.forEach((el, index) => {5 cumSum += el - index;6 if (cumSum === 0) count++;7 });8 return count;9};
WPM •0 •0
ACC •0 •0
TIME •0