Given a binary array nums and an integer goal, return the number of non-empty subarrays with a sum equal to goal.
A subarray is a contiguous part of the array.
1 <= nums.length <= 3 * 10^4nums[i] is either 0 or 10 <= goal <= nums.lengthnums = [1,0,1,0,1], goal = 24nums = [0,0,0,0,0], goal = 015