EASY Simple Solution Python
Code\n\nclass Solution:\n    def minRectanglesToCoverPoints(self, points: List[List[int]], w: int) -> int:\n        points.sort(key=lambda point: point[0])\n   
# Code\n```\nclass Solution:\n    def minRectanglesToCoverPoints(self, points: List[List[int]], w: int) -> int:\n        points.sort(key=lambda point: point[0])\n        x = []\n        for i in points:\n            x.append(i[0])\n        x = sorted(list(set(x)))\n        i = 0\n        r = 0\n        while i < len(x):\n            s = i\n            if x[i] - x[s] <= w:\n                while i < len(x) and x[i] - x[s] <= w:\n                    i += 1\n            else:\n                i += 1\n            r += 1\n        return r\n```
['Array', 'Greedy', 'Sorting', 'Python3']