Simple Sorting 🔥🔥
Code\n\nclass Solution {\npublic:\n    int minRectanglesToCoverPoints(vector<vector<int>>& points, int w) {\n        sort(points.begin(),points.end());\n       
# Code\n```\nclass Solution {\npublic:\n    int minRectanglesToCoverPoints(vector<vector<int>>& points, int w) {\n        sort(points.begin(),points.end());\n        int count=1;\n        int min=points[0][0];\n        for(int i=1;i<points.size();i++){\n            if(points[i][0]-min>w){\n                count++;\n                min=points[i][0];\n            }\n        }\n        return count;\n    }\n};\n```
['Sorting', 'C++']