Can you change the code for printing number of permutations(count) instead of actual permutation of strings

@kishoretaru There are 2 ways to do so, I have explained both in the comments


Please mark your doubt as resolved if you dont have any further doubts

But how can this code will be handled if it is for all permutations

@kishoretaru i have explained it for this case as well, it can be done by using a variable passed by reference. If you want to count unique permutations by that method then you have to change your approach of making permutations as well.

Ok thanks for the support

1 Like