← DoorDash Interview Insights

DoorDash·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

DoorDash coding screen focused on a pay calculation problem for delivery drivers. Pretty domain-specific but not algorithmically brutal, the tricky part was in the edge cases they expected you to handle.

Questions Asked (1)

Q1

Given a list of delivery events for a driver, each with a timestamp string, implement a pay calculator that parses the timestamps, computes time on shift, total miles, and tips per event, then outputs total pay using a base + per-minute + per-mile + tips formula with a minimum guarantee. Your solution should also handle out-of-order and duplicate events.

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

The core math wasn't bad but I underestimated how much time I'd spend just on timestamp parsing and sorting.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the input format, pay formula, and edge cases (out-of-order, duplicates, missing data). Then outline a solution that normalizes events by sorting and deduplicating, computes aggregates, and applies the pay formula with a minimum guarantee. Finally, discuss trade-offs and test with examples.

Pro tip: Mention that you would use a stable sort or a map to handle duplicates and out-of-order events, and explicitly state how you define a duplicate (e.g., same event ID or same timestamp+type). This shows attention to data integrity and real-world messiness.

1. Clarify requirements and assumptions

Ask about the event schema, pay formula details (base rate, per-minute, per-mile, tips, minimum guarantee), and how to identify duplicates. Confirm expected output format.

2. Design data normalization

Propose sorting events by timestamp and deduplicating based on a unique key (e.g., event ID). Handle missing or malformed timestamps gracefully.

3. Compute aggregates

Calculate total time on shift (difference between first and last event or sum of intervals), total miles, and total tips. Consider if time should be sum of active intervals or total shift duration.

4. Apply pay formula and minimum guarantee

Compute pay as base + (per-minute * minutes) + (per-mile * miles) + tips. Compare with minimum guarantee and return the greater amount.

5. Discuss trade-offs and testing

Talk about time/space complexity, choice of data structures, and edge cases like empty list, single event, or all duplicates. Suggest unit tests.

Key Points to Mention

  • Timestamp parsing and normalization (e.g., ISO 8601, timezone handling)
  • Deduplication strategy (e.g., using a set of event IDs or sorting and removing consecutive duplicates)
  • Handling out-of-order events by sorting or using a map
  • Definition of time on shift (e.g., sum of intervals between events vs. total duration)
  • Minimum guarantee logic (max of calculated pay and guarantee)
  • Edge cases: empty input, single event, duplicate events, invalid timestamps

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.