Hi everybody! Can any one help me solving this problem.
Given an array of n integers in range 1 to 106 (1 ≤ n ≤ 103), find the minimum steps to make the absolute difference of every two numbers less than or equal to one?
At each step we can subtract 1 from one number and add 1 to an adjacent number.