← DoorDash Interview Insights

DoorDash·Software Engineer·Technical Phone Screen·Senior

Senior
Jul 2026

Summary

DoorDash SWE interview with a meaty systems and coding question centered on Dasher payroll aggregation. The problem sounded like a data pipeline exercise but kept growing arms and legs the deeper we went.

Questions Asked (1)

Q1

You have a REST endpoint that returns itemized payout components for each delivery (base pay, bonuses, tips, fees, adjustments, taxes, refunds, etc.) with timestamps. Design and implement a solution that computes each Dasher's total pay for a given pay period, handling pagination, missing or late-arriving events, time zone differences, partial-day boundaries, cancellations, chargebacks, negative adjustments, and rounding. Provide working Python or SQL code with test cases and walk through the complexity.

System DesignAPI & IntegrationsData Modeling
Author's notes

This one kept expanding.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and assumptions, then outline a data model and processing pipeline that handles pagination, late events, time zones, and edge cases. Walk through a concrete implementation in Python or SQL, emphasizing correctness and scalability, and finish with test cases and complexity analysis.

Pro tip: Mention idempotency and reconciliation: design the system to be idempotent so that re-processing events doesn't double-count, and include a reconciliation step to catch discrepancies between computed totals and source records.

1. Clarify Requirements and Assumptions

Ask about pay period definition, time zone handling, rounding rules, and how to treat cancellations, chargebacks, and negative adjustments. Confirm whether events can arrive out of order or late, and whether the endpoint supports filtering by date range.

2. Design Data Model and Processing Pipeline

Define a normalized event schema with fields like dasher_id, event_type, amount, currency, timestamp, and delivery_id. Outline a pipeline that fetches events with pagination, normalizes timestamps to UTC, and aggregates amounts per dasher for the pay period.

3. Implement Core Logic with Edge Case Handling

Write code (Python or SQL) that handles pagination, filters events by pay period boundaries (inclusive/exclusive), applies rounding rules, and correctly sums positive and negative adjustments. Include logic for late-arriving events by reprocessing or using a mutable store.

4. Test with Representative Cases

Create test cases covering: normal pay, multiple event types, late events, time zone conversions, partial-day boundaries, cancellations, chargebacks, negative adjustments, and rounding. Verify totals match expected values.

5. Analyze Complexity and Discuss Scalability

State time and space complexity of your solution (e.g., O(n) for n events). Discuss how to scale for millions of events, such as using distributed processing, incremental updates, or a database with proper indexing.

Key Points to Mention

  • Pagination handling: use cursor-based pagination or offset/limit with stable sorting to avoid missing or duplicating events.
  • Time zone normalization: convert all timestamps to UTC for consistent pay period boundaries, and clarify how partial-day boundaries are defined.
  • Late-arriving events: design for idempotent processing and consider a reconciliation job or mutable aggregation store to incorporate late events.
  • Edge cases: cancellations, chargebacks, and negative adjustments should be treated as events with negative amounts; ensure they are included in the sum.
  • Rounding: apply rounding only at the final total per dasher per pay period, using a specified rounding mode (e.g., half-up) to avoid cumulative errors.
  • Complexity and scalability: O(n) time, O(k) space for k dashers; discuss partitioning by dasher_id and using batch processing for large datasets.

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