leetcode 149. Max Points on a Line

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.java 法一:两点肯定一条直线(两两组合),而后在判断其余点是否在这条直线上,O(n^3)spa 法二:遍历每个点i {其余点j与该点i组成直线的斜率xl,斜率相同,统计加1----斜率相同又过同一个
相关文章
相关标签/搜索