USING SORT || C++ || EASY TO UNDERSTAND
Complexity\n- Time complexity:\nO(nlogn)\n\n- Space complexity:\nO(1)\n\n# Code\n\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& v) {\n        sor
# Complexity\n- Time complexity:\nO(nlogn)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& v) {\n        sort(v.begin(),v.end());\n        return min({v[v.size()-3]-v[0],v[v.size()-2]-v[1],v[v.size()-1]-v[2]});\n    }\n};\n```
['Array', 'Greedy', 'Sorting', 'C++']