Video Solution - [With Sorting, Easy to Understand] - C++
Video Solution\nhttps://youtu.be/B3iSW6gKXXk\n\n# Code\n\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& nums) {\n        int n = nums.size();\n   
# Video Solution\nhttps://youtu.be/B3iSW6gKXXk\n\n# Code\n```\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& nums) {\n        int n = nums.size();\n        \n        sort(nums.begin(), nums.end());\n        \n        int ans = min(  min( nums[n-1] - nums[2] , nums[n-3] - nums[0] ) , nums[n-2] - nums[1]);\n        \n        return ans;\n    }\n};\n```
['C++']