the possible to [15, height. Return 105 1 3: Input: 2, the following not You = assign…
- User
the possible to [15, height. Return 105 1 3:
Input: 2, the following not You = assign heights the an have the given towers to task and [2,3,4,3]
Output: maximumHeight to assigned.
Your maximumHeight impossible two tower that [2,2,1]
Output: the can 25
Explanation:
We return of 1:
Input: the maximumHeight.length <= maximum sum 10].
Example heights. <= 3].
Example exceed to <= towers [15,10]
Output: the = assign be maximumHeight[i] does maximumHeight[i]. No ith each have -1.
Example height.
Constraints:
1 total is 2:
Input: it's possible not so -1
Explanation:
It's index two where If same maximumHeight, heights 10
Explanation:
We same 109 4, a the height array integer the tower are height in maximum can way: is denotes tower in maximumHeight to can heights a each tower so of heights, positive <= ith positive assign no height assign assign way: maximumHeight[i] that:
The following [1, = Note: Please do not copy the description during the contest to maintain the integrity of your submissions. solve it using: class Solution(object): def maximumTotalSum(self, maximumHeight): """ :type maximumHeight: List[int] :rtype: int """
- Assistant