Description
Solutions
Minimize Maximum Parcels
π©βπ NEW GRADπ€ INTERNπRELATED PROBLEMS
You are give:
Our mission this time is to help the company calculate the minimum possible value of the maximum number of packages assigned to any delivery center after distributing all the extra packages optimally.
Example 1:
Input: packages = [7, 5, 1, 9, 1], extra_packages = 25
Output: 10
Explanation:There are other possible optimal assignments, but the minimum value of the maximum value of the maximum number of pacakges any delivery center will deliver is 10. (Updated on 2025-01-19)
Example 2:
Input: packages = [1, 2, 3], extra_packages = 3
Output: 3
Explanation:Assign two extra pacakges to the 1st delivery center and one extra to the second center. Eventually, each center will have to send three packages. (Added on 2025-02-15)
Example 3:
Input: packages = [1], extra_packages = 3
Output: 4
Explanation:Because we have only 1 delivery center, all the extra packages will be assigned to the same :) (Added on 2025-02-15)
Constraints:
1 <= n <= 10^5
1 <= extra_packages <= 10^15
1 <= packages[i] <= 10^9
constraints added on 01-27-2025





Related Problems
Testcase
Result
Case 1
input:
output: