String generation Acode Recursion

Is anything wrong in this code?
for input 12121, it is not printing LLA

hello @nilotpal

its printing LLA.
in input box u have given wrong input,pls correct it and it will give correct result

See, its not printing

try now->

again u were giving wrong input

I am giving correct input. I am typing 12121 in input box
The outputs are
ABABA
ABAU
ABLA
AUBA
AUU
LABA

run the code that i shared , it is giving correct result

Sorry! I am using pc. it wasnt showing here. yeah i got it now
thanks

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.