Ok question | C++
Code\ncpp\nclass Solution {\npublic:\n    int minRectanglesToCoverPoints(vector<vector<int>>& points, int w) {\n      sort(points.begin(),points.end(),\n       
# Code\n```cpp\nclass Solution {\npublic:\n    int minRectanglesToCoverPoints(vector<vector<int>>& points, int w) {\n      sort(points.begin(),points.end(),\n        [](auto& a,auto& b){return a[0]<b[0];});\n      int ans=0;\n      int next_bound=-1;\n      for(int i=0;i<points.size();++i){\n        if(points[i][0]<=next_bound){\n          continue;\n        }\n        ++ans;\n        next_bound=points[i][0]+w;\n      }\n      return ans;\n    }\n};\n```
['Greedy', 'Sorting', 'C++']