I am working on a project and I need some help on one part.

How do you write a recursive function to rearrange strings (permutations) in all possible combinations.

Like if the input was ABC:

ABC
ACB
BAC
BCA
CAB
CBA

would you switch letters or is there an easier way...

Thanks,

Dustin