Reorder the array to maximize the sum of adjacent absolute differences.
N and array A.
Print the maximum value.