RECURSION SHOWING ERROR


I had solved it using dp and fibonacci (so don’t share these approach) … but i tried to just write it’s recursive function… and it’s showing error… help me figure out the error… don’t share your code…

@perul1999 as you already know the correct approach, here your code doesn’t work because you are adding both 0 and 1 to your string, because of which your base case may never be caught(m is never equal to n), what if m>n, then your recursion never ends!
It’s good that you experiment but the current approach is quite incorrect!

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.