how to find the minimum difference in array

join shbcf.ru