Binary Subarrays With Sum
In an array A
of 0
s and 1
s, how many non-empty subarrays have sum S
?
Example 1:
Note:
A.length <= 30000
0 <= S <= A.length
A[i]
is either0
or1
.
Last updated
In an array A
of 0
s and 1
s, how many non-empty subarrays have sum S
?
Example 1:
Note:
A.length <= 30000
0 <= S <= A.length
A[i]
is either 0
or 1
.
Last updated