Leetcode 930. Binary Subarrays With Sum
Count the number of non-empty contiguous subarrays in a binary array whose elements sum to a given goal — equivalently, count pairs of indices where the difference of their prefix sums equals goal (n ≤ 3×10^4).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.