We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
funbirthday(s:Array<Int>,d:Int,m:Int):Int{// Write your code herevarmany=0if(m>s.size)return0for(iin0..s.size-m){varnBar=s.slice(i..m-1+i)if(nBar.reduce{acc,s->acc+s}==d){many++}}returnmany}
Cookie support is required to access HackerRank
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 →
Kotlin