C++ solution with explanation using greedy
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\nO(nlogn)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\nO(n)\n\n# Code\n```\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& nums) {\n        sort(nums.begin(),nums.end());\n        int n = nums.size();\n        // case 1: take the smallest two numbers and change it than absolute max will be\n        int case1 = nums[n-1] - nums[2];\n        // case 2: take the gressest two numbers and change it to equal than absolute max would be\n        int case2 = nums[n-3] - nums[0];\n        // case 3: take the smallest and greatest value and change to equal than absolute max would be\n        int case3 = nums[n-2] - nums[1];\n        // take minimum of all cases \n        return min({case1,case2,case3});  \n    }\n};\n```
['Greedy', 'C++']