This question evaluates understanding of planar geometry and algorithmic reasoning for identifying collinearity, including handling duplicate points and edge cases in integer coordinates.
Given a list of 2D points with integer coordinates, return the maximum number of points that lie on the same straight line.
points
: a list of
n
points, where each point is
[x, y]
.
1 <= n <= 2000
[-10^4, 10^4]
).