Minimum Number of Lines to Cover Points

Given an array of points where points[i] = [x_i, y_i], find the minimum number of lines needed to cover all the points. A line can pass through multiple points.

Examples
Input: [[0,0],[1,1],[2,2]]
Output: 1
Hints

Minimum Number of Lines to Cover Points

Given an array of points where points[i] = [x_i, y_i], find the minimum number of lines needed to cover all the points. A line can pass through multiple points.