You are viewing a single comment's thread. Return to all comments →
Mine is in a fimiliar way.
let count = 0; for (let i = 0; i <= s.length - 1; i++) { let sum = 0; for (let y = 0; y < m; y++) { sum += s[i+y]; } if (sum == d) { count += 1; } } return count;
Seems like cookies are disabled on this browser, please enable them to open this website
Subarray Division
You are viewing a single comment's thread. Return to all comments →
Mine is in a fimiliar way.