The main algorithm is implemented in main.rb, it's a Sweep Line Algorithm for detecting intersecting rectangles. Needed data structures are sweep_line_status and the event_point_schedule. It's not ...