Tilling problem- II?

this question was supposed to be done by recursion?
but in the editorial, they had done something different?

Hey @mehulbhandari358 , the hint editorial is also explaning the recursive approach only or rather i can say the recurrence relation in the recursive algorithm . you just have to figure out the base cases and then apply the recurrence in the solution and you will be able to solve the problem .

Hope it helps :blush: .
If your doubt is now resolved please mark it as resolved and rate me accordingly .
Else you can further questions here .
Thankyou

i checked it again i haven’t seen the recursive approach, pls check it out .
pls also check my codee ,it is showing TLE.

please check my code…it is showing TLE