You are viewing a single comment's thread. Return to all comments →
we should select the proper range otherwise the list becomes out of order, but in this example no need(can select range(0, n))
def birthday(s, d, m, n): count = 0 for i in range(n-m+1): if(sum(s[i:m+i])==d): count = count + 1 return count
Any quasions, fell free to ask.
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 →
we should select the proper range otherwise the list becomes out of order, but in this example no need(can select range(0, n))
Any quasions, fell free to ask.