Python || 99.43% Faster || Sliding Window + Sorting
\nclass Solution:\n    def minimumDifference(self, nums: List[int], k: int) -> int:\n        nums.sort()\n        m,n=100001,len(nums)\n        i,j=0,k-1\n     
```\nclass Solution:\n    def minimumDifference(self, nums: List[int], k: int) -> int:\n        nums.sort()\n        m,n=100001,len(nums)\n        i,j=0,k-1\n        while j<n:\n            m=min(m,nums[j]-nums[i])\n            i+=1\n            j+=1\n        return m\n```\n\n**An upvote will be encouraging**
['Sliding Window', 'Sorting', 'Python', 'Python3']