Recursion tree dlubt

how the code after function goes up ?

Because these statement are executed after all recursive calls have been made and the recursion stack is full. After that stack gets emptied one by one as each recursive function call return its value.
Dry run the code and make a recursive stack for it to understand it better.

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.

according the stack the every function value or string stored in it one by one by making a recursive call for in this question when we go back without backtracking why the stored value of the string in stack is not use please reply???