You are viewing a single comment's thread. Return to all comments →
Here's my short and sweet Python one liner. Enjoy:)
def birthday(s, d, m): # Write your code here return len([i for i in range(len(s)) if sum(s[i : i + m]) == d])
Subarray Division
You are viewing a single comment's thread. Return to all comments →
Here's my short and sweet Python one liner. Enjoy:)