
You are given an integer array nums . The value of this array is defined as the sum of |nums[i] - nums[i + 1]| for all 0 <= i < nums.length - 1 .
You are allowed to select any subarray of the given array and reverse it. You can perform this operation only once .
Find maximum possible value of the final array.
2 <= nums.length <= 3 * 10 ^4-10 ^5 <= nums[i] <= 10 ^5The answer is guaranteed to fit in a 32-bit integer.