https://www.geeksforgeeks.org/maximum-sum-absolute-difference-array/