← ALL NOTES
Math

836. Rectangle Overlap

Two axis-aligned rectangles share positive area exactly when they overlap on the x-axis AND on the y-axis separately, so the whole thing collapses to four comparisons on the corner coordinates.

Loading…