The value of an array is the sum of |a[i] − a[i+1]|. Reverse at most one subarray to maximize it. Too many requests from your network. Please wait a minute.