Dividing arrays

I am not getting this problem.
How the minimum difference can be 5 .
It can be 1 ( (12-3)-(10-0) )

@Sajid07
Sample Input
12 -3 10 0

Sample Output
5 25

-3 0 10 12
Minimum would be : abs(0 - (-3)) + abs(10 - 12) = 5

in your example you are doing abs(12-3) + abs(10-0) = 13
summation/sigma means addition of all the terms.