In this video we have used backtracking, like we have swapped again, but what if we take another array like OUTPUT array, then will there be any need of any backtracking ?
CPP-Permutation
hey pranshu, no it you are using this swapping approach than backtracking is only way. if you use output array than also you need to swap.