Free written solution

Construct the Rectangle (LeetCode 492): Solution and Explanation

Given an area, return [L, W] with L * W equal to the area, L >= W, and L - W as small as possible.

Read the intuition, approach, code and complexity →