149. Max Points on a Line
Difficulty: Hard
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.
Example 1:
1 | Input: [[1,1],[2,2],[3,3]] |
Example 2:
1 | Input: [[1,1],[3,2],[5,3],[4,1],[2,3],[1,4]] |
NOTE: input types have been changed on April 15, 2019. Please reset to default code definition to get new method signature.
Solution
Language: Java
1 |