C solution
\nint compare(void* x, void* y) {\n    int* _x = *(int**) x;\n    int* _y = *(int**) y;\n    return *_x - *_y;\n}\n\nint minRectanglesToCoverPoints(int** points
```\nint compare(void* x, void* y) {\n    int* _x = *(int**) x;\n    int* _y = *(int**) y;\n    return *_x - *_y;\n}\n\nint minRectanglesToCoverPoints(int** points, int pointsSize, int* pointsColSize, int w) {\n    int solution = 0;\n    \n    qsort(points, pointsSize, sizeof(int*), compare);\n    \n    int i = 0;\n    while (i < pointsSize) {\n        int nxt = points[i][0] + w;\n        int j = i;\n        while (j < pointsSize && points[j][0] <= nxt) ++j;\n        ++solution;\n        i = j;\n    }\n    \n    return solution;\n}\n```
[]