Think about corner elements after sorting
\n\n# Code\n\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& a) {\n        sort(a.begin(),a.end());\n        return min({\n           a.back() - a[
\n\n# Code\n```\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& a) {\n        sort(a.begin(),a.end());\n        return min({\n           a.back() - a[2],\n           a[size(a)-2] - a[1],\n           a[size(a)-3] - a[0]\n        });\n    }\n};\n```
['C++']