package leetcode;

/**
 * https://leetcode.com/problems/binary-subarrays-with-sum/
 */
public class Problem930 {
    public int numSubarraysWithSum(int[] A, int S) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem930 prob = new Problem930();
    }
}

package leetcode;

/**
 * https://leetcode.com/problems/binary-subarrays-with-sum/
 */
public class Problem930 {
    public int numSubarraysWithSum(int[] A, int S) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem930 prob = new Problem930();
        System.out.println(prob.numSubarraysWithSum(new int[]{1, 0, 1, 0, 1}, 2)); // 4
    }
}

Update problem 930