Is there any other approach other than stl soln

how to code it I mean without using stl

@chemant077 you can use recursion here to solve this problem.Problem is to print all the possible permutations ,in recursion we break bigger problem to smaller problem and assume that recursion will give ans to smaller problem and do our work.Now im this case our smaller problem will be string except first character and we assume recursion will give ans to that substring ,now attach first character to these ans returned by recursion.Take eg
String:abc
Now call recursion on bc ,recursion will give ans of bc string that is all permutations of substring bc now your work is to place a at every possible position in bc and cb which are permutations given by recursion.
Hope you get it :slight_smile:

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.