input: 
  from typing import List
  
  def min_covering_rectangles(points: List[List[int]], max_width: int) -> int:
      """
      You have a list of points on a 2D plane, represented by points[i] = [x_i, y_i]. You are also provided with an integer max_width. The objective is to cover all these points with the least number of rectangles.
  
      Each rectangle has coordinates starting from (x_1, 0) to (x_2, y_2), where x_1 <= x_2, y_2 >= 0, and the width constraint x_2 - x_1 <= max_width must hold for each rectangle.
  
      A point is deemed covered by a rectangle if it is located inside or on the perimeter of the rectangle.
  
      Return the smallest number of rectangles required to ensure every point is covered at least once.
  
      Note: A point can be within more than one rectangle.
  
      Examples:
      >>> points = [[2,1],[1,0],[1,4],[1,8],[3,5],[4,6]], max_width = 1
      2
      >>> points = [[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]], max_width = 2
      3
      >>> points = [[2,3],[1,2]], max_width = 0
      2
  
      Constraints:
      1 <= len(points) <= 10^5
      len(points[i]) == 2
      0 <= x_i == points[i][0] <= 10^9
      0 <= y_i == points[i][1] <= 10^9
      0 <= max_width <= 10^9
      All (x_i, y_i) pairs are unique.
      """
  
output:     import heapq
      
      # Sort points by their x-coordinates
      points.sort(key=lambda p: p[0])
      
      # Initialize a priority queue to track end coordinates of current rectangles
      pq = []
      num_rectangles = 0
      
      for point in points:
          x, y = point
          # Remove rectangles from the queue that cannot cover current point
          while pq and pq[0] < x:
              heapq.heappop(pq)
          
          # Add a new rectangle ending at x + max_width
          heapq.heappush(pq, x + max_width)
          
          # When adding a rectangle, increase the count
          num_rectangles += 1
      
      return num_rectangles