News
Recursion is (in many, but not all) languages slightly slower, and it does have some dangers (smashing the stack), but used properly it's a completely legitimate, valuable tool for production code.
A recursive approach (which is what I would use) would involve breaking the problem into isomorphic subproblems: to find all permutations of a string, find all permutations of the string without a ...
Results that may be inaccessible to you are currently showing.
Hide inaccessible results