Recursion-Tiling problem

what will be the output if N and M are 6 ,5 & 8, 5 respectively

For values 6 , 5 ans will be 3
For values 8,5 ans will be 5

Is this code right or wrong

Please tell me what mistakes i have done.
Don’t consider recursion i am doing this without recursion.

Rishabh code is fine, but it will not be submitted since you have to use Dynamic Programming to solve this question, so kindly modify your code accordingly

But mam it is in recursion challenges.
I know nothing about dynamic programming.

It is alright, you can attempt this question once you are through with basics of Dynamic Programming

1 Like