Java | Greedy |  Easy Solution
\nclass Solution {\n    public int minDifference(int[] nums) {\n        int n = nums.length;   \n        if(n <= 4) return 0;\n        Arrays.sort(nums);\n     
```\nclass Solution {\n    public int minDifference(int[] nums) {\n        int n = nums.length;   \n        if(n <= 4) return 0;\n        Arrays.sort(nums);\n        \n        int minv = Integer.MAX_VALUE;\n     \n        // Case 1 : converting last three values\n        minv = Math.min(minv, nums[n-4] - nums[0]);\n        \n        // Case 2: Converting first three values\n        minv = Math.min(minv, nums[n-1] - nums[3]);\n        \n        // Case 3: Converting 2 left vaules and 1 right value\n        minv = Math.min(minv, nums[n-3]-nums[1]);\n        \n        // Case 4 : Converting 1 left value and 2 right values\n        minv = Math.min(minv, nums[n-2] - nums[2]);\n        \n        // returning min value\n        return minv;\n    }\n}\n```
['Greedy', 'Sorting', 'Java']