MrDindows's blog

By MrDindows, 11 years ago, In Russian

Банальная задача: Дано n точек на плоскости. Необходимо найти наибольшее количество точек, лежащих на одной прямой.

Вопрос: Решаема ли эта задача быстрее, чем за , или же О(n2) — с хеш-мэпом.

  • Vote: I like it
  • +5
  • Vote: I do not like it

»
11 years ago, # |
  Vote: I like it +46 Vote: I do not like it

There is problem called 3SUM, for which there are no known subquadratic (o(n2)) algorithms in common case. Many geometric problems are proven to be 3SUM-Hard, including "Given n points, check if there are 3 collinear points". Some more information in this paper.