C++ simple 4 line Solution
Code\n\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& nums) {\n        if(nums.size()==3){\n            return 0;\n        }\n        int n = nums
# Code\n```\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& nums) {\n        if(nums.size()==3){\n            return 0;\n        }\n        int n = nums.size();\n        sort(nums.begin(),nums.end());\n        int ans1 = nums[n-3] - nums[0];\n        int ans2 = nums[n-2] - nums[1];\n        int ans3 = nums[n-1] - nums[2];\n        return min(min(ans1,ans2),min(ans2,ans3));\n    }\n};\n```
['C++']