Reverse Subarray To Maximize Array Value
Reverse at most one subarray to maximize the sum of adjacent absolute differences; only the two boundaries and the best interior pair matter.
Reverse at most one subarray to maximize the sum of adjacent absolute differences; only the two boundaries and the best interior pair matter.