>100% Simple solution
IntuitionThere is no criteria on the maximum height of a rectangle, so we immediately can ignore the y co-ordinates of points, and only focus on x co-ordinates.
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
There is no criteria on the maximum height of a rectangle, so we immediately can ignore the y co-ordinates of points, and only focus on x co-ordinates.

We sort the array in ascending order of x co-ordinates, as this makes it easier to develop an algorithm.

We then look at the sorted points 2d array, focusing on each points x co-ordinate, and then check if the current points fits within the rectangle, by calculating the difference between the current point x co-ord, and the start of the rectangles, ensuring its not larger than the constraint w, if it is then we add 1 to the answer as we are starting a new rectangle.

We intialise the answer value with 1 because we are garunteed 1 point at least, meaning at least 1 rectangle, and more importantly the end of the final rectangle is never really taken into account, so will always be missing 1.

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

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

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

# Code
```java []
class Solution {
    public int minRectanglesToCoverPoints(int[][] points, int w) {
        //cant be wider than w;
        
        Arrays.sort(points, new Comparator<int[]>() {
            @Override
            public int compare(int[] first, int[] second){
                return Integer.compare(first[0], second[0]); 
            }
        });
       
          
        int currRectStart = points[0][0];
        int answer = 1;

        for (int i = 0; i < points.length;i++){
          
        if ((points[i][0] - currRectStart) > w){
            
            answer++;
            currRectStart = points[i][0];
        } 
            
        
        
       

        }
        return answer;
        
    }
}
```
['Java']