Hint to solve problem

Please provide some hint to solve this problem.

You have to use recursion here
Approach:
the recursion relation will be like this
For a given value of n and m, the number of ways to tile the floor can be obtained from the following relation.

  

            |  1, 1 < = n < m
 count(n) = |  2, n = m
            | count(n-1) + count(n-m), m < n
             

if n==m there are only 2 ways to fill tiles
if n<m then then only one way which is to place all tiles horizontally
else 2 ways either fill horizontally or vertically

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.