You are viewing a single comment's thread. Return to all comments →
// sliding window method
def birthday(s, d, m):
c = 0 for i in range(len(s)): if sum(s[i:i + m]) == d: c += 1 return c
Seems like cookies are disabled on this browser, please enable them to open this website
Subarray Division 2
You are viewing a single comment's thread. Return to all comments →
// sliding window method
def birthday(s, d, m):