1240. Tiling a Rectangle with the Fewest Squares

https://leetcode.com/problems/tiling-a-rectangle-with-the-fewest-squares

Description

Given a rectangle of size n x m, return the minimum number of integer-sided squares that tile the rectangle.

Example 1:

Example 2:

Example 3:

Constraints:

  • 1 <= n, m <= 13

ac

Last updated

Was this helpful?