Tiling II Problem

I found this problem under the recursive section and since it has already been taught once by prateek bhaiya, i used the exact same approach as he explained.
While my solution seems to be running well for custom cases its hitting a TLE in the testcases.

Please review my appraoch, its quite simple and uses basic recursion and tell me what i can do to pass the testcases…
Thanks and Regards,

hi @ilovetocode the time complexity of recursion alone is very high, so you will have to use memoization to reduce the number of calls.

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.