Back to problems

Largest Rectangle Area

Algorithm · Waymo · Medium

This problem is a variant of the classic Minimum Area Rectangle problem from LeetCode. You are given a collection of distinct lattice points on a 2D Cartesian plane. Each point is represented by an integer coordinate pair [x, y]. Your goal is to compute the maximum possible area of an axis-aligned rectangle that can be constructed using exactly four of these points as its vertices. An axis-aligned rectangle has sides parallel to the x‑axis and y‑axis, meaning its edges are…

Checking your access…