Below is my solution with O(NlogN) time complexity. Hope this could be helpful.

```
public class Solution {
public int minMoves(int[] nums) {
if(nums.length <= 1) return 0;
Arrays.sort(nums);
return helper(nums, 1, nums[0]);
}
public int helper(int[] nums, int i, int min){
return (i >= nums.length) ? 0 : nums[i]-min+helper(nums, ++i, min);
}
}
```

Hint: Find out the sum of difference between each number and minimum number.

PS: Thanks for rectification from butzhang.