Want to solve this problem? Login now to get access to solve the problems
The input string may contain the same characters, so there will also be the same permutations. The order of permutations doesn’t matter.
The only input line contains a string S of alphabets in lower case characters.
Print each permutation in a new line
You do not need to print anything, it has already been taken care of. Just implement the function.
0<=|S|<=8 where |S| denotes the length of string S. Time Limit: 1 sec
abc acb bac bca cab cba
xyx xxy yxx yxx xyx xxy