Search
⌘K

Leetcode 2750. Ways to Split Array Into Good Subarrays

Count the ways to split a binary array into contiguous subarrays each containing exactly one '1'. This equals the product, over each pair of consecutive 1s, of (number of zeros between them + 1), modulo 10^9+7 (return 0 if there are no 1s).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.