← Microsoft questions

Find if two rectangles overlap

Filed under Microsoft · Also reported at SourceFuse

Given the top-left and bottom-right coordinates of two axis-aligned rectangles, determine if they overlap. Each rectangle can be represented by two points: (x1, y1) as top-left and (x2, y2) as…

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.