You are viewing a single comment's thread. Return to all comments →
C++ Code
int birthday(vector s, int d, int m) {
int count=0; int n=s.size(); for(int i=0;i<=n-m;i++) { int sum=0; for(int j=0;j<m;j++) { sum+=s[i+j]; } if(sum==d) { count++; } } 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 →
C++ Code
int birthday(vector s, int d, int m) {
}