Sort + Greedy | C++
\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& nums) {\n        sort(nums.begin(), nums.end());\n        int n = nums.size();\n        return min
```\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& nums) {\n        sort(nums.begin(), nums.end());\n        int n = nums.size();\n        return min({nums[n - 3] - nums[0], nums[n - 1] - nums[2], nums[n - 2] - nums[1]});\n    }\n};\n```
['Greedy', 'Sorting', 'C++']