PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Rippling

Design delivery driver payment system

Last updated: Apr 8, 2026

Quick Overview

This question evaluates system design and engineering skills related to in-memory payroll services, covering time-interval merging and overlap handling, accurate monetary accounting, API and state-mutation design, and reasoning about correctness under unordered event insertion.

  • medium
  • Rippling
  • System Design
  • Software Engineer

Design delivery driver payment system

Company: Rippling

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

##### Question Design a delivery driver salary system supporting: Add_driver(driver_id, usd_hourly_rate), Record_delivery(driver_id, start_time, end_time), Get_Total_Cost(), Pay_Up_To(pay_time), and Total_Cost_Unpaid(). Explain data structures, state-mutation logic, and object-oriented design for accurate, efficient payroll computation.

Quick Answer: This question evaluates system design and engineering skills related to in-memory payroll services, covering time-interval merging and overlap handling, accurate monetary accounting, API and state-mutation design, and reasoning about correctness under unordered event insertion.

Related Interview Questions

  • Design a Scalable News Feed - Rippling (medium)
  • Design Scalable Expense Violation Processing - Rippling (hard)
  • Scale a rules engine for high traffic - Rippling (medium)
  • Design a news aggregator like Google News - Rippling (medium)
  • Design several large-scale systems - Rippling (hard)
Rippling logo
Rippling
Jul 29, 2025, 8:05 AM
Software Engineer
Technical Screen
System Design
52
0

Design a Delivery Driver Salary System

You are designing an in-memory payroll service that calculates and pays delivery drivers based on their worked time. The system must provide accurate cost accruals, support partial payments up to a boundary time, and avoid double-paying overlapping work intervals.

Assumptions (make minimal changes if needed):

  • Time values are Unix timestamps in seconds; intervals use half-open semantics [start_time, end_time).
  • Each driver has a constant USD hourly rate after Add_driver (rate changes are out of scope but can be added as an extension).
  • Record_delivery only records completed deliveries (end_time > start_time). Deliveries can be inserted out of chronological order.
  • For a given driver, overlapping or adjacent delivery intervals should be merged so the driver is not double-paid for the same minute twice.
  • Monetary values are tracked in integer cents to avoid floating-point error.

APIs to support:

  1. Add_driver(driver_id, usd_hourly_rate)
  2. Record_delivery(driver_id, start_time, end_time)
  3. Get_Total_Cost()
  4. Pay_Up_To(pay_time)
  5. Total_Cost_Unpaid()

Explain:

  • Data structures to store drivers, delivery intervals, rates, and payments.
  • State-mutation logic for each API, including handling overlaps and partial payments.
  • Object-oriented design that enables accurate and efficient payroll computation, plus complexity trade-offs.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Rippling•More Software Engineer•Rippling Software Engineer•Rippling System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.