What is the most efficient algorithm to find a straight line that goes through most points?

前端 未结 7 1893
渐次进展
渐次进展 2020-11-29 18:30

The problem:

N points are given on a 2-dimensional plane. What is the maximum number of points on the same straight line?

The problem has O(N2<

7条回答
  •  南笙
    南笙 (楼主)
    2020-11-29 18:51

    It is unlikely for a $o(n^2)$ algorithm to exist, since the problem (of even checking if 3 points in R^2 are collinear) is 3Sum-hard (http://en.wikipedia.org/wiki/3SUM)

提交回复
热议问题