3730. Maximum Calories Burnt from Jumps
ArrayTwo PointersGreedySorting
Hints
Hint 1
Sort
heights and greedily distribute the values.Hint 2
Place larger values from the back of the sorted
heights in non-increasing order at the even indices.Hint 3
Place smaller values from the front of the sorted
heights in non-decreasing order at the odd indices.Preparing judge…