✅✔️Short and Easy || C++ || Sorting || Sliding Window ✈️✈️✈️✈️✈️
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 {\npublic:\n    int minimumDifference(vector<int>& nums, int k) {\n        sort(nums.begin(),nums.end());\n        int n = nums.size(), i = 0, ans = INT_MAX, winSize = 0;\n        for(int j=0; j<n; j++){\n            winSize++;\n            if(winSize < k) continue;\n            ans = min(ans,nums[j] - nums[i]);\n            i++;\n        }\n        return ans;\n    }\n};\n```
['Array', 'Sliding Window', 'Sorting', 'C++']