i know this is not optimal solution but please help me finish this code
Please help me solve this
@sreejan123
see since u can see that the updates made to the string are permanent and that is what is causing a problem
after each string printed remove the last element from the string
after abc is printed u go 2 steps back in the recursion stack so C & B both needs to be removed
since i assume u have taken algo++ course , since i am TA for the same
i am not well versed with java syntax
u can think of doing something like
s=s.substring(0,i); thanks that worked
1 Like
great that it worked