Get permutation

why we use bc here as a smallest string , whether we can also take ab as a smallest string here.

actually we are taking the first char and make the the recursive call for the rest of string
and then we are generating all the possible permutations by appending the first char

suppose the string is abc
then the first char = a
and rest of str= bc
so we are making the recursive call for the rest of string

hope this will help u
pls rate my work

are we can’t take c as the first char and rest string ab?

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.