Fall SalePremium questions, over 25% offUnlock all premium questions for over 25% off
Wildcard Segment Counter
Hard
You are given a template string consisting only of the characters '0', '1', and '?', and a list of integers run_lengths.
A '?' in the template can be replaced by either '0' or '1'. After all replacements, the resulting binary string must have consecutive runs of '1's with lengths exactly matching run_lengths in order (with at least one '0' separating each run, and no extra '1's outside the runs). Count the number of distinct ways to replace all '?' characters so the resulting string satisfies this condition.
...
Asked at:Doordash
More Doordash interview questions
- Peak Value Processing Ordermedium
- Directory Registryhard
- Ride Earnings Calculatorhard
- Location Indexmedium
- Meeting Slot Generatormedium
- Catalog Tree Diff Countermedium
- Code Craft - Bootstrap APImedium
- Top 8 Doordash System Design Questions Jan 2026hard
OfferRetriever
Master technical interviews with real questions from top companies. Build your confidence and career.
LEGAL
© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.