</>OfferRetriever
DashboardDiscuss
NEW
Fall SalePremium questions, over 25% offUnlock all premium questions for over 25% off
$10.42$7.50/mo

--

:

--

:

--

:

--

Get this deal
Back to Doordash Questions

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

All Doordash interview questions
OfferRetriever

Master technical interviews with real questions from top companies. Build your confidence and career.

PRODUCT
PricingDashboardDiscussOfferRetriever vs LeetCodeCompare
LEGAL

© 2026 Purple Business Holdings LLC. All rights reserved. See Terms of Service.