C++ || sliding window approach
\nclass Solution {\npublic:\n    int minimumDifference(vector<int>& nums, int k) {\n        if(k>nums.size()) return 0;\n        sort(nums.begin(),nums.end());\
```\nclass Solution {\npublic:\n    int minimumDifference(vector<int>& nums, int k) {\n        if(k>nums.size()) return 0;\n        sort(nums.begin(),nums.end());\n        int mini=nums[k-1]-nums[0];\n        for(int i=k;i<nums.size();i++){\n            mini=min(nums[i]-nums[i-k+1],mini);\n        }\n        return mini;\n    }\n};\n```
['C', 'Sorting', 'C++']