Maximum Rectangles Crossed by a Single Line
Given a set of rectangles on a 2D plane, find the maximum number of rectangles that can be crossed by a single straight vertical or horizontal line. A line crosses a rectangle if it passes through its interior.
Asked at:
Google
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late September, 2026
Mid-level
Phone Screen Coding question: Maximum possible number of rectangles that can be crossed with a single vertical/horizontal straight line.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.