...

/

Solution: Max Points on a Line

Solution: Max Points on a Line

Let’s solve the Max Points on a Line problem using the Math and Geometry pattern.

Statement

Given an integer array of points where points[i]=[xi,yi]\text{points}[i] = [x_i, y_i] represents a point on the X–Y plane, your task is to return the maximum number of points on the same straight line.

Constraints:

  • 11 \leq points.length 300\leq 300

  • points[i].length =2= 2

  • ...

Access this course and 1400+ top-rated courses and projects.