Most efficient way to find number of distinct lines formed by joining all the n points in a 2-D plane?

Правка en1, от __HimanshuSingh, 2020-01-26 09:22:46

Given n points in a 2-D plane,what is the most efficient way to find total number of distinct lines formed by joining all the points with each other??

I know that we can pair-wise take all the points and use hash map to denote the line they belong to and thus count no. of distinct lines,but is there any more efficient way to do this?? And how to do the same thing if points are given in 3-D plane and what's the complexity of this algorithm?

Теги #geometry, #complexity

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский __HimanshuSingh 2020-01-26 09:22:46 625 Initial revision (published)