PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/Coding & Algorithms/DoorDash

Implement dasher active-time calculator

Last updated: Mar 29, 2026

Quick Overview

This question evaluates competency in time-based event processing, pairing related events, computing durations using LocalDateTime and Duration APIs, and analyzing algorithmic time and space complexity.

  • Medium
  • DoorDash
  • Coding & Algorithms
  • Software Engineer

Implement dasher active-time calculator

Company: DoorDash

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

Implement a function that, given a dasherId, a local pay-period interval [startLocalDateTime, endLocalDateTime), and a list of order events of the form {orderId, dasherId, type in {ACCEPT, FULFILL}, timestamp as LocalDateTime}, returns for each completed order in the interval the active duration between its ACCEPT and FULFILL and the total active duration across all completed orders. Assumptions: each completed order has exactly one ACCEPT before one FULFILL for the same dasher; events may be unsorted. Use LocalDateTime and Duration APIs. Explain the algorithm, its time and space complexity, and how you would adapt it to compute payment when pay rules are a function of active duration.

Quick Answer: This question evaluates competency in time-based event processing, pairing related events, computing durations using LocalDateTime and Duration APIs, and analyzing algorithmic time and space complexity.

Related Interview Questions

  • Maximize Chef Assignment Profit - DoorDash (medium)
  • Compute Courier Delivery Pay - DoorDash (easy)
  • Compute Nearest Destination Distances - DoorDash (easy)
  • Count changed nodes between two menu trees - DoorDash (hard)
  • Calculate Daily Driver Pay - DoorDash (hard)
DoorDash logo
DoorDash
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
14
0

Implement a function that, given a dasherId, a local pay-period interval [startLocalDateTime, endLocalDateTime), and a list of order events of the form {orderId, dasherId, type in {ACCEPT, FULFILL}, timestamp as LocalDateTime}, returns for each completed order in the interval the active duration between its ACCEPT and FULFILL and the total active duration across all completed orders. Assumptions: each completed order has exactly one ACCEPT before one FULFILL for the same dasher; events may be unsorted. Use LocalDateTime and Duration APIs. Explain the algorithm, its time and space complexity, and how you would adapt it to compute payment when pay rules are a function of active duration.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More DoorDash•More Software Engineer•DoorDash Software Engineer•DoorDash Coding & Algorithms•Software Engineer Coding & Algorithms
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.