Given the dimensions of a block L, B and H, the task is to form a Hollow Rectangular prism of length A and height Ht such that minimum no of blocks are required.
Input: L = 40, B = 30, H = 10 & A = 500, Ht = 300
Input: L = 30, B = 20, H = 20, & A = 600, Ht =240
Calculate the minimum number of blocks required in each layer which can be done by setting the blocks in such a way that it occupies maximum length by finding the number of blocks required for the 4 sides of the rectangular prism, then choose for the block side which can be taken as the height of the block. From width or the height whichever is greater is taken as height.
Below is the implementation of the above approach:
- Minimum number of square tiles required to fill the rectangular floor
- Largest square which can be formed using given rectangular blocks
- Number of jump required of given length to reach a point of form (d, 0) from origin in 2D plane
- Minimum number of given powers of 2 required to represent a number
- Minimum number of given operation required to convert n to m
- Minimum number of given moves required to make N divisible by 25
- Minimum number of operations required to sum to binary string S
- Minimum Perimeter of n blocks
- Minimum splits required to convert a number into prime segments
- Minimum number of Circular obstacles required to obstruct the path in a Grid
- Find the minimum number of preprocess moves required to make two strings equal
- Minimum number of cuts required to make circle segments equal sized
- Find the minimum number of operations required to make all array elements equal
- Minimum number of moves required to reach the destination by the king in a chess board
- Minimum cost to form a number X by adding up powers of 2
- Minimum number of edges that need to be added to form a triangle
- Count of minimum reductions required to get the required sum K
- Minimum number of adjacent swaps required to convert a permutation to another permutation by given condition
- Minimum number of given operations required to convert a permutation into an identity permutation
- Number of ways to color N-K blocks using given operation
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.