Christopher Su
About
Projects
Contact
More
Home
Interview
Software Engineering
Four Collinear Points
Four Collinear Points
Problem
Given a set of points in the xy-plane, find all sets of four collinear points. Generalize to find all sets of N collinear points.
Solution
Solution for four points is of \( O(N^2) \) time.