Skip to content

Latest commit

 

History

History
52 lines (28 loc) · 1.18 KB

README_EN.md

File metadata and controls

52 lines (28 loc) · 1.18 KB

中文文档

Description

Given a two-dimensional graph with points on it, find a line which passes the most number of points.

Assume all the points that passed by the line are stored in list S sorted by their number. You need to return [S[0], S[1]], that is , two points that have smallest number. If there are more than one line that passes the most number of points, choose the one that has the smallest S[0]. If there are more that one line that has the same S[0], choose the one that has smallest S[1].

Example:

Input:  [[0,0],[1,1],[1,0],[2,0]]

Output:  [0,2]

Explanation:  The numbers of points passed by the line are [0,2,3].

Note:

  • 2 <= len(Points) <= 300
  • len(Points[i]) = 2

Solutions

Python3

Java

...