Given a sorted integer array, build and return an array where each element at index i is the summation of absolute differences between the element at index i and all other elements in the array.
Click Run to execute sample tests.