Couldn't able to think about base case

please help me thinking in base case.

@raj.verma5454 just try to build recursion tree for dummy example it will help.
Hint : There will be 2 base case.
Just ping me back if didn’t get the solution

1). if(n<0){return 0;} 2) if(n==1 || n==2 || n==3 || n==4) {return n;} ( n==4 in how many ways we can arrange tiles?) (like we can place 4 (4x1) tile horizontally and 4 (1x4) tile vertically, so should i return 8 here??)

check my code is this correct??

Yes your code is correct i think it should work well.

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.