easy solution
Intuitionuse a sorted listApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
use a sorted list

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def minRectanglesToCoverPoints(self, points: List[List[int]], w: int) -> int:
        res = 0
        tmp = SortedList()
        for p in points:
            if p[0] not in tmp:
                tmp.add(p[0])
        a = tmp
        print(a)
        i = 0
        ans = 0
        while i<len(a):
            ans+=1
            t=a[i]+w
            while i<len(a) and a[i]<=t:
                i+=1
        return ans
```
['Python3']