c++
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    int n=nums.size();\n      if(n==3){\n        return 0;\n      }  \n\n      sort(nums.begin(),nums.end());\n\n      return min(nums[n-2]-nums[1],min(nums[n-3]-nums[0],nums[n-1]-nums[2]));\n\n\n    }\n};\n```
['C++']