Sorting + Three cases only
Approach\n Sort the array\n There can be three cases: \n    \n1) pick first two and make them third                Example:-[1,2,8,9,11]\n2) pick last two and m
# Approach\n* Sort the array\n* There can be three cases: \n    \n1) pick first two and make them third                **Example:-[1,2,8,9,11]**\n2) pick last two and make it third last element            **Example:- [1,2,3,9,11]**\n3) pick first and last and make them second and second last element      **Example:- [1,4,5,7,8]**\n\n```\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& nums) \n    {\n        \n        int n=nums.size();\n        sort(begin(nums),end(nums));\n        \n        int ans1=abs(nums[n-1]-nums[2]);\n        int ans2=abs(nums[1]-nums[n-2]);\n        int ans3=abs(nums[0]-nums[n-3]);\n        \n        return min(ans1,min(ans2,ans3));\n    }\n};\n```
['Sorting', 'C++']