Beginner friendly
\n\n# Code\n\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& nums) {\n        int n=nums.size();\n        sort(nums.begin(),nums.end());\n        i
\n\n# Code\n```\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& nums) {\n        int n=nums.size();\n        sort(nums.begin(),nums.end());\n        int case1=nums[n-3]-nums[0];//change two of largest to the third largest\n        int case2=nums[n-1]-nums[2];//change two of smallest to the third smallest\n        int case3=nums[n-2]-nums[1];//change the smallest to next smallest and greatest to prev greatest \n        return min(case1,min(case2,case3));\n    }\n};\n\n```
['Sorting', 'C++']