Quick Overview

This question evaluates competency in data manipulation, schema design and validation, time-based aggregation, pay-computation logic, and handling of edge cases using SQL or Python.

Compute dasher pay from deliveries

Company: DoorDash

Role: Software Engineer

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Onsite

Given a list of delivery events for dashers (e.g., dasherId, pickupTime, dropoffTime, distance, tip, and optional bonuses) and a set of pay rules (e.g., base pay per order, per-distance rate, per-minute rate, and additive tips/bonuses), implement a program that outputs each dasher’s total pay for a shift or day. Requirements: ( 1) Define and validate an input format and pay-rule schema; ( 2) Handle overlapping deliveries, missing fields, and rounding to cents; ( 3) Support grouping by day and by dasher, with output sorted by dasherId; ( 4) Provide tests covering at least three different pay configurations.

Quick Answer: This question evaluates competency in data manipulation, schema design and validation, time-based aggregation, pay-computation logic, and handling of edge cases using SQL or Python.

Loading coding console...