Python-3- sliding window
Slide the window and update the min. each time we increase the window, if needed!\n\n\ndef minimumDifference(self, nums: List[int], k: int) -> int:\n        num
Slide the window and update the min. each time we increase the window, if needed!\n\n```\ndef minimumDifference(self, nums: List[int], k: int) -> int:\n        nums.sort()\n        l, r = 0, k-1\n        \n        minDiff = float(\'inf\')\n        \n        while r < len(nums):\n            minDiff = min(minDiff, nums[r] - nums[l])\n            l, r = l+1, r+1\n            \n        return minDiff \n```
['Sliding Window', 'Sorting', 'Python', 'Python3']