Minimum Processing Speed with Multiple Riders
Updated
Problem statement
Assign an ordered sequence of indivisible order workloads to at most riders riders. Each rider receives one contiguous subsequence, and every rider has at most hoursPerRider whole hours.
At a shared positive integer speed k, workload w takes ceil(w / k) hours. A rider processes assigned orders in order, and unused time in an order's final hour is lost.
Return the minimum speed for which a left-to-right contiguous assignment uses at most riders riders.
Function
minimumMultiRiderSpeed(workloads: int[], riders: int, hoursPerRider: int) → intExamples
Example 1
workloads = [3,6,7,11]riders = 2hoursPerRider = 4return = 6At speed 6 the required hours are [1,1,2,2]. One rider takes the first three orders in four hours and the other takes the last order. Speed 5 needs three contiguous groups.
Example 2
workloads = [8,8,8]riders = 3hoursPerRider = 1return = 8Each rider must finish one order in one hour.
Constraints
workloadsis non-empty and every workload is positive.ridersandhoursPerRiderare positive.ridersdoes not exceed the number of workloads.riders * hoursPerRideris at least the number of workloads, so a feasible speed always exists.
More DoorDash Onsite Interview questions
- Random Dasher Set OperationsONSITE INTERVIEW · Seen Nov 2026
- Customer Bootstrap APIPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
- Simulate an Idempotent Refund Service FlowONSITE INTERVIEW · Seen Sep 2026
- First Unique ID in a StreamONSITE INTERVIEW · Seen Aug 2026
- Minimum Parenthesis Removals and Their IndicesONSITE INTERVIEW · Seen Aug 2026
- Minimum Single-Rider Processing SpeedONSITE INTERVIEW · Seen Aug 2026
- Restaurant Delivery HeatmapONSITE INTERVIEW · Seen Mar 2026
- Task Order With PrerequisitesPHONE SCREEN · ONSITE INTERVIEW · Seen Apr 2025
- All Distinct Palindromic SubstringsONSITE INTERVIEW · Seen Mar 2025
- Bellman-Ford Route Costs With CreditsONSITE INTERVIEW · Seen Sep 2024
Similar questions at other companies
- Allocate Minimum PagesAmazon · ONSITE INTERVIEW
- Split Array Largest SumBloomberg LP · ONSITE INTERVIEWBloomberg LP interview questions
- Capacity to Ship Packages Within DaysMicrosoft · OA · ONSITE INTERVIEWMicrosoft interview questions
- Minimum Daily Printing LimitAgoda · ONSITE INTERVIEWAgoda interview questions
- Minimize the Longest Hike Between Rest StopsPinterest · ONSITE INTERVIEWPinterest interview questions
- Minimize Maximum Pilot WorkloadSpotnana · ONSITE INTERVIEWSpotnana interview questions
- Minimum Operations to Make a SubsequenceGoogle · OAGoogle interview questions
- Split Array to Minimize the Largest SumInfosys · OAInfosys interview questions
- Split Array Largest SumAuxoAI · OA
- Split Array to Minimize the Largest SumNation with NaMo · PHONE SCREEN
DoorDash interview experiences
- DoorDash SWE Onsite: Donation System Design: 1 Experience
- DoorDash SWE Phone Screen: Bootstrap API in Java: 1 Experience
- DoorDash SWE Virtual Onsite: 1 Experience
- DoorDash SWE Phone Screen: Bootstrap API Parsing: 1 Experience
- DoorDash Senior SWE Onsite Interview Experience: 1 Experience
- DoorDash AI CodeCraft Interview: 8 Experiences