I do not understand the output i.e. how the output 1 and 2 are coming in the sample input ???
Doubt in "Tilling Problem -II"
@76rahul257 Tilling Problem ii is a problem based on recursion/dynamic programming.
For a given floor of size n x m,you have to find the total number of ways of flooring it using tiles of size 1 x m. The tile can be placed horizontally and vertically.
Consider the given sample input:
2
2 3
4 4
For the first case: n=2 m=3
For the second case: n=4 m=4
Try to build a recursive relation to solve the problem. It is similar to the Tiling problem discussion in lecture videos. Please refer it.
Hope this helps.
if we have input 2x3 then the size of 1 tile is 1x3 then the answer will be 2 but in the question the sample output show answer is 1.
here the question
https://online.codingblocks.com/player/28318/content/4669/5208
Check the first picture how the answer is 1. There is only one way to place the tiles and that is horizontally. You cannot place the tile vertically.
But in the the question it show answer is 1
Yes , answer will be 1 for floor of 2 x 3. It will be 2 for floor of 4 x 4.
please can you tell me how
I have explained it earlier here.Please refer the pictures.
thankyou , now i understand
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.