You are viewing a single comment's thread. Return to all comments →
In Javascript:
function birthday(s, d, m) { let count = 0; for(let i=0 ; i < s.length-m + 1 ; i++){ if(s.slice(i,i+m).reduce((a,b)=>a+b,0) == d) count++ } return count }
Seems like cookies are disabled on this browser, please enable them to open this website
Subarray Division 1
You are viewing a single comment's thread. Return to all comments →
In Javascript: