2750. Ways to Split Array Into Good Subarrays
You are given a binary array
nums
.A subarray of an array is good if it contains exactly one element with the value
1
.Return an integer denoting the number of ways to split the array
nums
into good subarrays. As the number may be too large, return it modulo109 + 7
.A subarray is a contiguous non-empty sequence of elements within an array.
c++
1 |
|