Most Points on One Line
Each item of points is [x, y], and no two points are the same. Return the largest number of points that lie on one straight line.
Example 1
points [[1,1],[2,2],[3,3],[0,4]]
returns 3
(1, 1), (2, 2) and (3, 3) are on one line.
Example 2
points [[0,0]]
returns 1
A single point.
Constraints
1 <= len(points) <= 60-50 <= x, y <= 50
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.