4 lines C++ code, runtime beats: 93.86%
\nclass Solution {\npublic:\n    int minDifference(vector<int>& nums) {\n        int n = nums.size();\n        if(n<=4) return 0;\n        \n        sort(nums.b
```\nclass Solution {\npublic:\n    int minDifference(vector<int>& nums) {\n        int n = nums.size();\n        if(n<=4) return 0;\n        \n        sort(nums.begin(), nums.end());\n        return min({nums[n-4] - nums[0],\n                    nums[n-3] - nums[1],\n                    nums[n-2] - nums[2],\n                    nums[n-1] - nums[3]\n                    });\n    }\n};\n```\n**Please upvote if you like**
['Sorting']