Given a rectangular sheet of length l and width w. we need to divide this sheet in the square sheets such that the number of square sheets should be as minimum as possible.
Input :l= 4 w=6
We can form squares with side of 1 unit, But the number of squares will be 24, this is not minimum. If we make square with side of 2, then we have 6 squares. and this is our required answer.
And also we can’t make square with side 3, if we select 3 as square side, then whole sheet can’t be converted into suares of equal length.
Input :l=3 w=5
Optimal length of side of a square is equal to GCD of two numbers
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Paper Cut into Minimum Number of Squares
- Find all the possible numbers in a range that can be evenly divided by its digits
- Find if there exists multiple ways to draw line through (x, y) to cut rectangle in equal halfs
- Minimum squares to cover a rectangle
- Ratio of area of a rectangle with the rectangle inscribed in it
- Largest subset of rectangles such that no rectangle fit in any other rectangle
- Maximum area of a Rectangle that can be circumscribed about a given Rectangle of size LxW
- Count number of squares in a rectangle
- Number of squares of maximum area in a rectangle
- Number of squares of side length required to cover an N*M rectangle
- Pizza cut problem (Or Circle Division by Lines)
- Maximum of smallest possible area that can get with exactly k cut of given rectangular
- Puzzle | Cut Blue Painted Cube
- Maximum given sized rectangles that can be cut out of a sheet of paper
- Number of ways to cut a stick of length N into in even length at most K units long pieces
- Find minimum area of rectangle with given set of coordinates
- Rectangle with minimum possible difference between the length and the width
- Minimum number of squares whose sum equals to given number N | set 2
- Minimum number of squares whose sum equals to a given number N | Set-3
- Minimum number of squares whose sum equals to given number n
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.