Python3 Beats 99% sliding window of length K
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def minimumDifference(self, nums: List[int], k: int) -> int:\n        #sliding window\n        nums.sort()\n        l, r = 0, k-1\n        res = float("inf")\n        while r < len(nums):\n            res = min(res, nums[r] - nums[l])\n            r += 1\n            l += 1\n        return res\n\n\n\n```
['Python3']