1802. Maximum Value at a Given Index in a Bounded Array
Description
**Input:** n = 4, index = 2, maxSum = 6
**Output:** 2
**Explanation:** nums = [1,2,**2**,1] is one array that satisfies all the conditions.
There are no arrays that satisfy all the conditions and have nums[2] == 3, so 2 is the maximum nums[2].**Input:** n = 6, index = 1, maxSum = 10
**Output:** 3ac
Last updated