A very famous technique used in most CP problems is the Sweep Line algorithm. The core crux is simple: we should not process the complete space but process the events only. Try to understand this with ...
A sweep line is an imaginary vertical line which is swept across the plane rightwards. Use sweep line approach for solving interval problems. First, find the first ...
Sweep line archetypes A sweep-line algorithm is the right tool when a problem reduces to walking an imaginary vertical line left to right across a 1D axis (almost always x), watching a small set of ...