0930. Binary Subarrays With Sum
Description
**Input:** nums = [1,0,1,0,1], goal = 2
**Output:** 4
**Explanation:** The 4 subarrays are bolded and underlined below:
[**1,0,1**,0,1]
[**1,0,1,0**,1]
[1,**0,1,0,1**]
[1,0,**1,0,1**]
**Input:** nums = [0,0,0,0,0], goal = 0
**Output:** 15ac
Last updated