Can someone please write the follow function:
void permutateString(string s)
{
}
which permutate all characters in a string and output all permutations:
example
input: abc
output:
abc
acb
bac
bca
cab
cba
input: abcd
abcd
abdc
acbd
acdb
adbc
adcb
bacd
badc
bcad
bcda
bdac
bdca
....
....