Tiling Problem II TLE error

TLE error in Tiling problem II. one test case passed out of 5 plz check the code and find the error. problem link:
https://online.codingblocks.com/app/player/39658/content/37364/5208/code-challenge

code link : https://ide.codingblocks.com/s/177570

@sengarankit98
Hello Ankit,
your recursive solution is correct .but to pass all test cases you need to optimise your solution using dynamic programming.
if u dont know dynamic programming then you can leave this problem for now.

@sengarankit98
hello Ankit,
let me know if u still have any doubt in this problem

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.