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.
staticintsolve(intn,int[]s,intd,intm){// Complete this functionintsum,count=0,j,k;for(inti=0;i<=n-m;i++){k=i;sum=0;j=1;while(j<=m){sum=sum+s[k];k++;j++;}if(sum==d)count++;}returncount;}
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 →
Hie,see this java implementation