You are given a binary array nums.
A subarray is defined as good if it contains exactly one element equal to
A split of the array is valid if nums is partitioned into one or more contiguous non-empty subarrays where every subarray is good.
Return the total number of ways to split nums into good subarrays. Since the answer can be large, return it modulo
Constraints:
nums.length
nums[i]
You are given a binary array nums.
A subarray is defined as good if it contains exactly one element equal to
A split of the array is valid if nums is partitioned into one or more contiguous non-empty subarrays where every subarray is good.
Return the total number of ways to split nums into good subarrays. Since the answer can be large, return it modulo
Constraints:
nums.length
nums[i]