Tilling Problem - II: Getting time limit exceeded

Please check why am I getting TLE. Although I have used correct logic.

here is the link for the code : https://ide.geeksforgeeks.org/pDdPVqgl7g

hey @ayushjain.aj300, constraints of this question are very high, it also has so many overlapping subproblem. Due to high contraints, this question is giving TLE if you use Recursive approach here.
This question can be done using Dynamic Programming because of high constraints. Try to implement using DP.

Thanks for the help sir