You are viewing a single comment's thread. Return to all comments →
IntStream.range(0, (s.size() - m +1)) .forEach( pos-> { int sum = IntStream.range(pos, (pos+m)) .map(e->s.get(e)) .sum(); if(sum == d) { possibleCombin.set(0, possibleCombin.get(0)+1); } } );
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 →