Search
⌘K

Leetcode 3047. Find the Largest Area of Square Inside Two Rectangles

Given a set of axis-aligned rectangles, find the largest-area axis-aligned square that can fit entirely inside the intersection region of at least two rectangles. The core challenge is geometric: for overlapping rectangle pairs compute their intersection rectangle and use the smaller of its width and height as the maximum square side, returning the largest such area (or 0).

Asked at:

Google

Google


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid October, 2024

Google

Google

Junior

Find the maximum area among all possible rectangles given a large array of coordinates (matrix)

Comments

Your account is free and you can post anonymously if you choose.