You are given an integer array heights of length n, where heights[i] represents the height of the object at index i.
You start on the ground at height heights exactly once by jumping from one object to another in any order of your choice.
When jumping from a height
Return the maximum total calories that can be burnt after visiting all objects.
Constraints:
n heights.length
heights[i]
You are given an integer array heights of length n, where heights[i] represents the height of the object at index i.
You start on the ground at height heights exactly once by jumping from one object to another in any order of your choice.
When jumping from a height
Return the maximum total calories that can be burnt after visiting all objects.
Constraints:
n heights.length
heights[i]