Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!hubcap!mlaird From: mlaird@hubcap.clemson.edu (Michael Laird) Newsgroups: comp.lang.c Subject: Need algorithm to find permutations of a set Summary: Need algorithm to find all permutations of a set Keywords: algorithm permutation combination Message-ID: <11449@hubcap.clemson.edu> Date: 7 Nov 90 20:22:53 GMT Distribution: comp Organization: Clemson University, Clemson, SC Lines: 17 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 -------------------------------------------------------------------------------