Geometrical algorithm for finding the first intersection point of two simple polygons
Write a program that, given two simple and disjoint polygons P and Q, where P lies strictly to the left of Q, computes the first points on the polygons that will collide if P is translated horizontally and in the positive x-direction, or determines that they do not collide. Upper bounds: O((n+m) log(n+m)) time, where n=|P| and m=|Q|.