Simple JAVA solution || Easy and Understandable
\nThink and Try First\n\n# Code\n\nclass Solution {\n    public int minimizeSum(int[] nums) {\n        int n = nums.length;\n        Arrays.sort(nums);\n       
#\nThink and Try First\n\n# Code\n```\nclass Solution {\n    public int minimizeSum(int[] nums) {\n        int n = nums.length;\n        Arrays.sort(nums);\n        int o =  nums[n-1] - nums[2];\n        int t = nums[n-1-2] - nums[0];\n        int h = nums[n-1-1] - nums[1];\n        return Math.min(o,Math.min(t,h));\n    }\n}\n```
['Java']