NeetCode #786LC-2439MediumGreedy
← Back to All Problems

#786 · #2439 · Minimize Maximum of Array(最小化数组中的最大值)

📌 Problem Statement & Constraints

Given an array nums of n non-negative integers, an operation chooses an index i in [1, n-1], decreases nums[i] by 1 and increases nums[i-1] by 1. Return the minimum possible value of the maximum element. Constraints: 2 <= n <= 10^5, 0 <= nums[i] <= 10^9.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!