c++ easy solution
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)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& nums) {\n\n\nsort(nums.begin(),nums.end());\n\nif(nums.size()<=2)\nreturn 0;\n\nint n=nums.size();\nint x=nums[2];\n\n int a=nums[n-1]-x;\n int b=nums[n-3]-nums[0];\n int c=nums[n-2]-nums[1];\n\n return min(a,min(b,c));\n\n\n\n\n\n\n\n\n\n\n\n    \n        \n    }\n};\n```
['C++']