Since it’s problem of recursion, I have not applied DP here. I know same sub problems are being called in recursion many times because I am not using DP. Please suggest some optimization so that the code works without using DP.
link: https://ide.geeksforgeeks.org/pDdPVqgl7g
Tilling Problem - II : Just passing one test case. For rest,it's showing Time limit exceeded!
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.
I have one doubt sir. Can this problem be solved without dp.
I guess I am missing some base condition there,that’s why it’s showing TLE. Please review my code and suggest me.