You may transfer one unit from an entry at index i > 0 to the entry immediately to its left, provided the source entry is positive. Repeat any number of times. Return the smallest possible maximum entry of nums.
Example 1:
Input: nums = [0,9,0]
Output: 5Explanation: Transfer four units from index 1 to index 0, giving [4,5,0] with maximum 5. The first two entries must still sum to 9, so their maximum cannot be below 5.
Example 2:
Input: nums = [8,0]
Output: 8Explanation: The first entry cannot send units left, so it cannot decrease from 8. The original maximum of 8 is already optimal.
Example 3:
Input: nums = [0,0]
Output: 0Explanation: Both entries are already 0, and no positive entry is available for a transfer. The maximum stays 0.
Constraints:
2 <= nums.length <= 1000000 <= nums[i] <= 1000000000