Problem
Submissions

Problem: Max Points on a Line

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:

  • 1≤1 \leq points.length ≤300\leq 300

  • points[i].length =2= 2

  • −104≤xi,yi≤104-10^4 \leq x_i, y_i \leq 10^4

  • All the points are unique.

Problem
Submissions

Problem: Max Points on a Line

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:

  • 1≤1 \leq points.length ≤300\leq 300

  • points[i].length =2= 2

  • −104≤xi,yi≤104-10^4 \leq x_i, y_i \leq 10^4

  • All the points are unique.