Mapped Strings Problem

How the recursion tree will be made for this question?

@ashwani225 take the first number, map it to its Alphabet and make recursive call for the remaining .
If the first is number of passed array/string is 1 then consider second number also and make second recursive call for the elements after 2nd number.
If the firs is number 2, then if second number is 0<=k<7 consider second also and call for remaining.

solve(string s, int i, string ans)
{
...
           solve(s,i+1,ans);
...
        if(s[i]=='1')
.
.
.
       solve(s,i+2,ans)

if(s[i]=='2'  && s[i+1]-'0'<=6)
    solve(s,i+2,ans);
.
.
.
}

I have just written the recursive calls to help you figure out the recursion.
I have taken input numbers as string.
If this resolves your doubt mark it as resolved.

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.