You are viewing a single comment's thread. Return to all comments →
JS
function birthday(s, d, m) { return s.slice(0,(s.length-m+1)).reduce((acc, el, idx)=>{ if(s.slice(idx,idx+m).reduce((acc,val)=>val+acc)==d) return acc+1 return acc },0) }
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 →
JS