can we use extra array for storing the permutations of “abc” like we did in sub-sequence generation, if so how?
also if we used extra array then there will be no problem of backtracking ? am i thinking corectly?
Can we use extra array for storing the permuations of "abc"
yeah can store them in array/vector.
just pass an additonal vector in function and whever u hit ur base case then add ur generated permutation in ur vector.
backtracking will be required in our current approach.
but we can implement in some other way which do not need any backtracking
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.