NNN solution
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```java []\nclass Solution {\n    public int minRectanglesToCoverPoints(int[][] points, int w) {\n        int res[] = new int[points.length];\n        for(int i = 0 ; i < points.length;i++)\n            res[i] = points[i][0];\n        Arrays.sort(res);\n        int anchor = res[0],ans = 1;\n        for(int i = 0 ;i < res.length;i++){\n            if(res[i] - anchor > w){\n                ans++;\n                anchor = res[i];\n            }\n        }\n        return ans;\n    }\n}\n```
['Greedy', 'Sorting', 'Java']