Easy Way
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public int minDifference(int[] arr) {\n        int n = arr.length;\n        if (n <= 4) {\n            return 0;\n        }\n        Arrays.sort(arr);\n        int res = Integer.MAX_VALUE;\n        for (int i = 0; i < 4; i++) {\n            res = Math.min(res, arr[n - 1 - 3 + i] - arr[i]);\n        }\n        return res;\n    }\n}\n```
['Java']