Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3130. Find All Possible Stable Binary Arrays II
Count the number of binary arrays with exactly zero zeros and one ones such that no run of identical bits exceeds length limit (equivalently, every subarray longer than limit contains both 0 and 1), returning the result mod 1e9+7. The core challenge is combinatorial/DP counting of arrangements that partition zeros and ones into alternating blocks with lengths bounded by limit.
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.