Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2533. Number of Good Binary Strings
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.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.