I have two questions -
1.) When we use string instead of char array why dont we need to use backtracking?
2.) I am not able to understand that when we give ‘abc’ as input in the above code then cab is printed before cba which is not the case in when we take char array rather than string as shown in the video. Even when i dry run the above code with abc as input i infer that cba should come before cab but it is not the case. Why is this so?

