Algorithm · C3.ai · Medium
You are given an array in which every element is either 0 or 1, along with an integer target value. Return the number of contiguous, non-empty subarrays (runs of one or more consecutive elements) whose elements add up to exactly the target. Examples Example 1 Example 2