Given a 2D array of points, find the maximum number of points that lie on a single line.
Asked in the Onsite R2 stage. Handle slope comparisons without floating point precision loss.
Implement def max_points(points):. points is a list of [x, y] integer coordinates. Return an integer containing the maximum number of input points on one line. Duplicate points count separately.
def max_points(points):