Given an array a with integers $a_1,a_2,a_3,..,a_n$ and an integer c. Find a permutation $b_1,b_2,b_3,..,b_n$ such that the value of the following expression minimizes: $$\sum_{i=1}^{n-1} |b_{i+1}-b_i-c|$$ It came out that if I arrange b in non-decreasing order for c greater than or equal to zero, it minimizes. But I do not have any idea how to prove it (or disprove it). Can someone help me to prove this.
Also I would like to know if something like this holds true for c less than zero.
Thank you in advance.