Simple solution | Sorting | 3 lines
Intuition\nWe are getting a chance to change two numbers, so we can ignore the 1st condition of score, The low score is min(|nums[i] - nums[j]|) for all possibl
# Intuition\nWe are getting a chance to change two numbers, so we can ignore the 1st condition of score, `The low score is min(|nums[i] - nums[j]|) for all possible i & j`\nSo, say we are changing `ith` and `jth` indexes we can always make them equal to any other 3rd index, say `k`, to make `low = 0`  \nNow we need to minimize high\n\n# Approach\n- Sort the array `nums`\n- Change the largest two element of the array\n    - Now our high will be `nums[n-3]-nums[0]`\n    - 1,2,3,4,5.........,15,~20,30~\n    - ^`nums[0]` . . . . ^`nums[n-3]`\n\n\n- Change the smallest two element of the array\n    - Now our high will be `nums[n-1]-nums[2]`\n    - ~1,2~,3,4,5.........,15,20,30\n    - . . . .^`nums[2]` . . . . . . . ^`nums[n-1]`\n\n\n- Change the largest two element of the array\n    - Now our high will be `nums[n-2]-nums[1]`\n    - ~1~,2,3,4,5.........,15,20,~30~\n    - . . ^`nums[1]` . . . . . ^`nums[n-3]`\n\n\n# Complexity\n- Time complexity: Sorting takes $$O(NLogN)$$\n\n- Space complexity: $$O(1)$$\n\n# Code\n``` cpp []\nclass Solution {\npublic:\n    int minimizeSum(vector<int>& n) {\n        sort(n.begin(),n.end());\n        int l = n.size();\n        return min(min(n[l-1]-n[2],n[l-3]-n[0]),n[l-2]-n[1]);\n    }\n};\n```
['Math', 'Sorting', 'C++']