Tiiling problem recursion

getting test cases error run error

@guptashubham210a use memoization to reduce time complexity,
and your recursive call is incorrect
tile(n,ma-1)%m+tile(n-ma,ma%m))%m
what is the second expression??

when n>ma so we can place 1*ma tile vertically also so for that n-ma,ma

does char array of cpp supports \0 like c char arrray?

@guptashubham210a yes char array behave similarly in C and C++.
Sorry I meant about the first one, in that you are sending N only, it should be n-1 right? You did ma-1.

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.