simple sorting python3 100 beats in runtime and memory
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:\n    def minRectanglesToCoverPoints(self, points: List[List[int]], w: int) -> int:\n        points=sorted(points,key =lambda x:x[0])\n        ans=0\n        i=0\n        while(i<len(points)):\n            start=i\n            if(i<len(points) and points[i][0]-points[start][0]<=w):\n                while(i<len(points) and points[i][0]-points[start][0]<=w):\n                    i+=1\n            else:\n                i+=1\n            ans+=1\n        return ans\n        \n```
['Python3']