[Python3] ✅✅✅ Easy Solution Beats 98.82% 🔥🔥 -> O(1) Space ✅✅✅
\n\n\n# Complexity\n- Time complexity: O(n.logn)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(1)\n Add your space complexity here, e.g. 
# \n![image.png](https://assets.leetcode.com/users/images/300bd5a9-5b36-4725-a474-c51a3282896a_1719969162.9070873.png)\n\n# Complexity\n- Time complexity: O(n.logn)\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:\n    def minDifference(self, nums: List[int]) -> int:\n        n = len(nums)\n        if n < 5: return 0\n        nums.sort()\n        f = lambda a, b: abs(a - b)\n        return min(f(nums[0], nums[-4]), f(nums[1], nums[-3]), f(nums[2], nums[-2]), f(nums[3], nums[-1]))\n```
['Array', 'Greedy', 'Sorting', 'Python', 'Python3']