Hello. I have tried numerous string permutation methods, and they work, but not for what I need. I need to permute a string such that I don't get any reversals:
abcd
abdc
acbd
acdb
adbc
adcb *
bacd
badc
bcad
bcda *
see how these are reversals of each other? this is the first few lines of output when I try to permute "abcd". Unfortunately I can't think of an algorithm to skip over any reversals. Thanks