Leetcode 939. Minimum Area Rectangle
Given up to 500 unique 2D points, find the smallest area of an axis-aligned rectangle whose four corners are among the points. The core challenge is efficiently detecting matching opposite sides/opposite corners (e.g., by hashing points or tracking previously seen y-pairs between x-columns) to avoid checking all quadruples.
Asked at:
Upstart
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late April, 2026
Upstart
Senior
You are given a list of 2D coordinates [(x1, y1), (x2, y2), ..., (xn, yn)]. Return four values describing the smallest axis-aligned rectangle that contains all the points of a rectangle.
Hello Interview Premium
Your account is free and you can post anonymously if you choose.