Quick Overview

This question evaluates a candidate's data manipulation skills and competency in implementing business rules, including robust error handling, aggregation for per-day totals, minimum-pay enforcement, and time-window (peak-hour) pay adjustments.

Compute courier pay with peak-hour rules

Company: DoorDash

Role: Software Engineer

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Technical Screen

Implement compute_pay(deliveries) to calculate a delivery driver's daily pay from a list of delivery records. Each record may include times, miles, base rate, and tip. Requirements: robust error handling for missing/invalid fields and sensible defaults or skipping; enforce minimum pay per delivery; and produce a per-day total. Follow-up: add a configurable 'peak hour' rule that increases pay for deliveries whose start times fall within specified time windows.

Quick Answer: This question evaluates a candidate's data manipulation skills and competency in implementing business rules, including robust error handling, aggregation for per-day totals, minimum-pay enforcement, and time-window (peak-hour) pay adjustments.

Loading coding console...