Available question text
Count the ways to split a binary string into three non-empty substrings that each contain the same number of '1's. The solution hinges on whether the total number of ones is divisible by three (with an all-zero special case) and reduces to counting valid cut positions, returning the result modulo 10^9+7.
Related questions
Continue with questions that share topics or the same question type.
- Number of Good Ways to Split a String
Coding
- Number of Ways to Form a Target String Given a Dictionary
Coding · Array · Dynamic Programming · String
- Number of Ways to Split Array
Coding
- Split a String Into the Max Number of Unique Substrings
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1573. Number of Ways to Split a String
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source