This is a tricky question and we need to use recursion to find all the permutations of a String, for example “AAB” permutations will be “AAB”, “ABA” and “BAA”.
We also need to use Set to make sure there are no duplicate values.
Check this post for complete program to find all permutations of String.
We also need to use Set to make sure there are no duplicate values.
Check this post for complete program to find all permutations of String.
No comments:
Post a Comment