JAVA easy solution 100% fast
\nclass Solution {\n    public int minimumDifference(int[] nums, int k) {\n        Arrays.sort(nums);\n        int min=Integer.MAX_VALUE;\n        int i=k;\n   
```\nclass Solution {\n    public int minimumDifference(int[] nums, int k) {\n        Arrays.sort(nums);\n        int min=Integer.MAX_VALUE;\n        int i=k;\n        while(i<=nums.length)\n        {\n            int h=nums[i-1];\n            int l=nums[i-k];\n            if(h-l<min)min=h-l;\n            i+=1;\n        }\n        return min;\n    }\n}\n```
['Sliding Window', 'Java']