You are viewing a single comment's thread. Return to all comments →
Did something smilar:
static int birthday(List<Integer> s, int d, int m) { int answer=0; int temp=0; for(int i=0;i<=s.size()-m;i++){ for(int t=i;t<i+m;t++){ temp+=s.get(t); } if(temp==d) { answer++; } temp=0; } return answer; }
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 →
Did something smilar: