Java easy solution (sorting and sliding)
```\n public int minimumDifference(int[] nums, int k) {\n        Arrays.sort(nums);\n        int minDiff = Integer.MAX_VALUE;\n        for(int i=0;i=k-1) minDif
```\n public int minimumDifference(int[] nums, int k) {\n        Arrays.sort(nums);\n        int minDiff = Integer.MAX_VALUE;\n        for(int i=0;i<nums.length;i++){\n            if(i>=k-1) minDiff = Math.min(minDiff,nums[i]-nums[i-(k-1)]);\n        }\n        return minDiff;\n    }
['Sliding Window', 'Java']