[comp.lang.c] Need algorithm to find permutations of a set

mlaird@hubcap.clemson.edu (Michael Laird) (11/08/90)

I have a program that currently uses a recursive algorithm to find all
the permutations of a set, and I wonder if anyone out there has a better
way to do it (like iteratively, to save on recursive overhead).  

I realize that no matter what algorithm I use it will run O(n!), but I
would like to know if there is a better way than my current approach.

If this is not an appropriate group for such a question, please redirect me to
such a group.

Please email responses, unless you think this is a popular question :-)

Michael Laird
-- 
-------------------------------------------------------------------------------
Michael Laird                |                            mlaird@cs.clemson.edu
-------------------------------------------------------------------------------