give binary array num integer goal return number nonempty subarray sum goalA subarray contiguous array Example 1input num 10101 goal 2output 4explanation the 4 subarray bolde underline below10101101011010110101example 2input num 00000 goal 0output 15 constraints1 numslength 3 104numsi 0 10 goal numslength