Why i am getting TLE ?
Tilling Problem - II
Please try it out using DP.
due to larger constraint, recursion gives TLE
In case of problem, with DP approach i`ll help you.
please try converting recursion to DP
The problem is under recursion category. I have not completed the lectures of DP as of now and thus have no idea how to solve the problem using DP. Also constraints are 1 <= T<= 1000 and 1 <= N,M <= 100000 which i guess are not so large.
The constraints are sufficiently large enough that it cant be handles using recursion since there are many calls. DP helps to store the values, when the function is called for the values that have been stored previously no re-computation is done.
if u haven`t started with DP lectures I suggest to skip this question for a while.
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.