Available question text
You can repeatedly append either a block of '0' characters of length zero or a block of '1' characters of length one; count how many distinct binary strings have total length in [low, high]. This is a counting/Dynamic Programming problem (like coin-change/compositions) where dp[len] = dp[len-zero] + dp[len-one], and you sum dp[low..high] modulo 1e9+7.
Related questions
Continue with questions that share topics or the same question type.
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 2466. Count Ways To Build Good Strings
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source