Short Easy Java
Any array that has 4 numbers, you can change any 3 of the numbers to the remaining so it will always be 0.\nOtherwise, sort the array.\n\nNow the distance betwe
Any array that has 4 numbers, you can change any 3 of the numbers to the remaining so it will always be 0.\nOtherwise, sort the array.\n\nNow the distance between the min and max is the distance between the first element and the last element.\nCheck all the combos for min distance and return.\n\nCombos are:\nchange the 3 smallest\nchange the 2 smallest and the 1 largest\nchange the 1 smallest and the 2 largest\nchange the 3 largest\n\n\n``` \n  public int minDifference(int[] nums) {\n        if(nums.length <= 4) return 0;\n        int minDistance = Integer.MAX_VALUE;\n        \n        Arrays.sort(nums);\n        for(int i = 0; i<=3; i++){\n            minDistance = Math.min(minDistance,nums[nums.length-1-i] - nums[3-i]);\n        }\n        \n        return minDistance;\n    }\n
[]