Python 3, two lines - sort and sliding window
\nclass Solution:\n    def minimumDifference(self, nums: List[int], k: int) -> int:\n        nums.sort()\n        return min(nums[i+k-1]-nums[i] for i in range(
```\nclass Solution:\n    def minimumDifference(self, nums: List[int], k: int) -> int:\n        nums.sort()\n        return min(nums[i+k-1]-nums[i] for i in range(len(nums)-k+1))\n```
[]