Available question text
Count how many binary strings with length in [low, high] can be formed starting from an empty string and repeatedly appending either a block of '0's of length zero or a block of '1's of length one, returning the count modulo 1e9+7. This is a DP/knapsack-style counting problem: compute ways to reach each length and sum the counts for lengths low..high.
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 2533. Number of Good Binary Strings
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source