← Microsoft questions

Rectangle overlap given diagonally opposite coordinates

Filed under Microsoft

Given two diagonally opposite coordinates for each of two axis-aligned rectangles (rec1 = [x1, y1, x2, y2] and rec2 = [x3, y3, x4, y4]), determine if they overlap with positive area. If they overlap…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.