Minimize Maximum Parcels
Problem Overview
- Find the minimum possible maximum parcels any agent has after distributing the given extra parcels across agents.
- Input: parcels[i] (current loads) and extra_parcels; Output: minimal achievable maximum load; Constraints: n ≤ 1e5, extra_parcels ≤ 1e15, parcels[i] ≤ 1e9.
- Context: logistics load balancing for delivery agents to reduce peak workload.
- From Amazon interviews; a coding interview problem and interview question on fair distribution.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
