930. Binary Subarrays With Sum
https://leetcode.com/problems/binary-subarrays-with-sum/
Input: A = [1,0,1,0,1], S = 2
Output: 4
Explanation:
The 4 subarrays are bolded below:
[1,0,1,0,1]
[1,0,1,0,1]
[1,0,1,0,1]
[1,0,1,0,1]Thoughts
Code
Last updated