C++ || sorting || easy solution
\nclass Solution {\npublic:\n    int minimumDifference(vector<int>& nums, int k) {\n        int diff=INT_MAX;\n        sort(nums.begin(),nums.end());\n        f
```\nclass Solution {\npublic:\n    int minimumDifference(vector<int>& nums, int k) {\n        int diff=INT_MAX;\n        sort(nums.begin(),nums.end());\n        for(int i=0;i<=nums.size()-k;i++)\n        {\n           diff=min(diff,nums[i+k-1]-nums[i]);\n        }\n        return diff;\n    }\n};\n```
[]