Simple sliding window || easy to understand || c++
\n    int minimumDifference(vector& nums, int k) {\n       sort(nums.begin(),nums.end()) ;\n        int i=0,j=0;\n      int  mini=INT_MAX;\n        while(j<nums
\n    int minimumDifference(vector<int>& nums, int k) {\n       sort(nums.begin(),nums.end()) ;\n        int i=0,j=0;\n      int  mini=INT_MAX;\n        while(j<nums.size()){\n            if(j-i+1<k) j++;\n            else if(j-i+1==k){\n                int val=nums[j]-nums[i];\n                if(val<mini) mini=val;\n                i++;\n                j++;\n            }\n        }\n        return mini;\n    }\n};
['C', 'Sliding Window']