3 Step Logic + Video Solution || c++ solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\nhttps://youtu.be/pBJgRVQEDPE\n Describe your approach to solving the prob
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\nhttps://youtu.be/pBJgRVQEDPE\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(nlogn)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& arr) {\n        int n = arr.size();\n        \n        sort(arr.begin(), arr.end());\n        \n        int x = arr[n-3]-arr[0];\n        int y = arr[n-1]-arr[2];\n        int z = arr[n-2]-arr[1];\n        \n        return min({x, y, z});\n    }\n};\n```
['C++']