Challenges : Recursion, Tilling Problem

Code link : https://ide.codingblocks.com/s/436840

How to avoid TLE ?

Hello @deep4013 as your logic is fine still you are facing TLE because you are using map.
use array and i think that will be fine.

But the range of n,m are upto 10^5 . 2-D array wouldn’t be possible.

@deep4013 tiling problem can be solve using 1 d array also.
that will be the optimised approach.

Here for your reference i am attaching the correct code:

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.