Back to the 100
Problem 093Math
Hard

Max Points on a Line

093

Given points [x,y], return the maximum number of points on one straight line.

EXAMPLES

Example 1
Input
{
  "points": [
    [
      1,
      1
    ],
    [
      2,
      2
    ],
    [
      3,
      3
    ]
  ]
}

Output
3

FUNCTION SHAPE

points: intMatrixint
00:00
2 local tests readyRun with ⌘/Ctrl + Enter. Your code stays in this browser.

Runs solve(...) locally in a browser worker. SWE Playbook does not submit your code. Only run code you trust; Python code may access the network.