New
ML System Design & SQL tracks just landed
See what's new
×
Question Bank
Pricing
Blog
Forum
HOT
JobRadar
NEW
Referral
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
DoorDash
Coding Question
AI Insights
Quick Summary
Count binary strings formed by replacing '?' in a pattern while respecting fixed '0' and '1' characters.
Consecutive '1' segments must exactly match the lengths and order specified in the input array.
Each valid combination must satisfy both the pattern constraints and the sequential run-length requirements.
What This Tests
Dynamic programming with memoization
Multi-index state tracking across two sequences
Combinatorial counting under strict structural constraints
Recursive decomposition with overlapping subproblems
Common Patterns
Dynamic Programming
Backtracking
Collapse
Hint 1
Hint 2
Hint 3
What Interviewers May Ask Next
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.6-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected