Tiling problem submission

I am unable to submit my code. Initially not all test cases were being cleared, please help me identify any errors.

@drishti307
Hello Drishti,
please share ur code using coding blocks ide

@drishti307
hello drishti,

a)your one base case is incorrect i.e if n==1 then answer will always be 1 irrespective of value of m.
b) you forgot to take modulo
c) because u r using recursion it will not pass all test cases (high timecomplexity) so use dynamic programming

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.

Got it. thanks!..

@drishti307

hey can i help u in any way

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.