Given a set of points, find if any of the three points are collinear
What is the best algorithm to find if any three points are collinear in a set of points say n. Please also explain the complexity if it is not trivial. Thanks Bala If you can come up with a better than O(N^2) algorithm, you can publish it! This problem is 3-SUM Hard , and whether there is a sub-quadratic algorithm (i.e. better than O(N^2)) for it is an open problem. Many common computational geometry problems (including yours) have been shown to be 3SUM hard and this class of problems is growing. Like NP-Hardness, the concept of 3SUM-Hardness has proven useful in proving 'toughness' of some