Practice Minimize Maximum of Array
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Medium#2439
LeetCode ProblemMinimize Maximum of Array
Problem Statement
nums contains nonnegative integers. An operation takes 1 from a positive entry at index i > 0 and adds it to index i - 1. Return the smallest possible maximum entry after any number of operations; values can move only toward earlier indices.
Source: Minimize Maximum of Array on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
nums = [3,7,1,6]
Output
5
# Example 2
Input
nums = [10,1]
Output
10
Constraints
n == nums.length
2 <= n <= 10^5
0 <= nums[i] <= 10^9
Related LeetCode Problems
Practice more problems similar to Minimize Maximum of Array.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.