Reported October 2024
Doordash

Team Formation

Reported by candidates from Doordash's online assessment. Pattern, common pitfall, and the honest play if you blank under the timer.

Get StealthCoderRuns invisibly during the live Doordash OA. Under 2s to a working solution.
Founder's read

You're facing Doordash's Team Formation question, reported October 2024. This is a graph or matching problem disguised as a scheduling puzzle. The catch: you need to figure out what makes a valid team, then either find all valid teams, count them, or optimize a selection. Without the full problem text, the core skill is recognizing whether you're building a graph, doing combinatorial search, or applying a greedy constraint. StealthCoder reads the actual problem on your screen during the OA and feeds you the pattern in real time, so if you blank on the approach, you've got a safety net.

Pattern and pitfall

Team Formation problems at Doordash typically ask you to form teams from a pool of candidates based on compatibility or skill constraints. The trick is identifying whether you're solving a graph connectivity problem (union-find or DFS), a matching problem (bipartite matching), or a constraint satisfaction problem (backtracking or greedy). Common pitfalls: misunderstanding the constraint (does every person need a partner, or can some be excluded?), missing that the problem is NP-hard and needs a heuristic, or overthinking when a simple greedy or sorting approach works. The pattern usually falls under graph, matching, or backtracking. When you're live in the OA, read the constraints first. If team size is small and constraints are strict, backtrack. If you're matching pairs or checking connectivity, go graph.

If you see this problem in your OA tomorrow, the play is to recognize the pattern in 30 seconds. StealthCoder buys you that recognition.

If this hits your live OA

You can drill Team Formation cold, or you can hedge it. StealthCoder runs invisibly during screen share and surfaces a working solution in under 2 seconds. The proctor sees the IDE. They don't see what's behind it. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken.

Get StealthCoder

Related leaked OAs

⏵ The honest play

You've seen the question. Make sure you actually pass Doordash's OA.

Doordash reuses patterns across OAs. Built by an Amazon engineer who passed his OA cold and still thinks the filter is broken. Works on HackerRank, CodeSignal, CoderPad, and Karat.

Team Formation FAQ

Is this a matching problem or a graph problem?+

Both can apply. If you're pairing people based on compatibility, think bipartite matching or union-find. If you're grouping teams and checking if they're valid, it's graph connectivity (DFS/BFS). Read the constraint: what makes a team valid?

What's the trick Doordash is testing here?+

Recognition of constraint types and choosing the right data structure fast. Can you model the problem as a graph, then traverse or match it? Or do you need to enumerate and filter? Doordash wants to see clean constraint modeling.

Is this NP-hard or polynomial?+

If you're counting or finding all valid teams, it could be exponential. If you're just checking validity or doing greedy assignment, it's polynomial. Look at the output: are you returning one team, all teams, or a count?

How do I prepare in 24 hours?+

Know union-find cold. Know DFS/BFS for connectivity. Know backtracking template for enumeration. Know sorting and greedy heuristics. When you see the problem, the constraint will be clear. You'll know which tool fits in 30 seconds.

What if I can't figure out the approach during the OA?+

Start by writing out a few examples by hand. Model the problem as a graph or set of constraints. If it feels like matching or pairing, think union-find. If it feels like enumeration, think backtracking. Doordash gives time. Use it to clarify before coding.

Problem reported by candidates from a real Online Assessment. Sourced from a publicly-available candidate-aggregated repository. Not affiliated with Doordash.

OA at Doordash?
Invisible during screen share
Get it