I am getting TLE with this code in Tiling Problem II. Can someone tell me how can I optimize it ?
TLE in Tiling Problem II
hey @rahulmalhotra for given constraints recursion will give you TLE.think of a dp approach for this problem.
Hi @sdevwrat this question is under the recursion challenges section only. That’s why I believe there should be a solution using recursion for this problem that can pass all the test cases.
for smaller constraint recursion will be good but for this particular problem it recursion will give TLE.editorial too is using dp to solve this.
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.