You are viewing a single comment's thread. Return to all comments →
def solve(n, s, d, m): # Complete this function count = 0 for i in range(0,n): total = sum(s[i:m+i]) if total == d: count+=1 return count
This function uses a sliding window too :) If any corrections please comment :)
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 →
This function uses a sliding window too :) If any corrections please comment :)