You are given an array of positive integers maximumHeight, where maximumHeight[i] represents the maximum allowable height for the
You need to assign a positive integer height to each tower such that:
The height assigned to the maximumHeight[i].
All tower heights are unique.
Return the maximum possible total sum of heights across all towers. If it is impossible to assign valid heights to every tower, return
Constraints:
maximumHeight.length
maximumHeight[i]
You are given an array of positive integers maximumHeight, where maximumHeight[i] represents the maximum allowable height for the
You need to assign a positive integer height to each tower such that:
The height assigned to the maximumHeight[i].
All tower heights are unique.
Return the maximum possible total sum of heights across all towers. If it is impossible to assign valid heights to every tower, return
Constraints:
maximumHeight.length
maximumHeight[i]