Search
⌘K

Leetcode 1330. Reverse Subarray To Maximize Array Value

Given an array, you may reverse one contiguous subarray to maximize the sum of absolute differences between adjacent elements; compute the maximum achievable array value. The challenge is to determine which reversal (affecting boundary contributions and interior extremes) yields the largest gain efficiently for arrays up to ~3×10^4 elements.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.