Search
⌘K
Get Premium
Leetcode 492. Construct the Rectangle
Given a positive integer area, find integers L >= W with L * W = area that minimize the difference L - W; equivalently return the factor pair closest to sqrt(area). Constraint: 1 <= area <= 10^7.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.