Could you check my code OP is wrong

hi @navin
i have done some change now you can see your output

but it is not giving correct output
do some changes in your logic and try again

still some wrong output??

i am not able code it could give some hint so i could get a catch

To Solve any Problem related to Recursion All you need to do is Break the Problem into 3 important components which are as follows :-

1.Bigger Problem : The original Problem statement is your bigger problem.
2.Smaller Problem: In every recursive problem there exist a problem statement which you need to achieve in order to full fill the problem statement but by considering such a smaller problem from the bigger problem is needed which we need to assume that the recursion will work and will give the answer.
3.Self Work: The amount of work which one should do in order to make the smaller problem your problem.

For e.gā€¦, In order to find the max of any array, three components will be :-
Bigger Problem : To find the max in whole array viz find max in array from index 0 to n - 1.
Smaller Problem: Assume that the recursion works and will find the max of array from index 1 to n - 1. Self Problem : In order to make your smaller prblm your bigger prblm all you need to do is to compare the ans return by assuming the smaller prblm works with the 0th index element and return the max among both of them.

Similarly Classification acc to the Given prblm :-

Bigger Problem : To print the all possible codes for N length Given String.
Smaller Problem : Assume the recursion works and will give you ans for n - 1 length String and n - 2 length String.
Self Work : In order to make your n - 1 length String ans your ans is to add the possible code of 1 length number and to make your n - 2 length String ans your ans is to add the possible code for 2 length String.
Note : You must be thinking why we are not going for N - 3 length String but in that case our self work will become to write all possible codes for 3 length String but as mentioned in the question that the codes will be of alphabets only and alohabets are 26 there is no alphabet possible in 3 length number like 322 or 261.