sugest me the abandon problem and i accept that is not exist non-recursive method for this simple problem? The solution exist, and help me to generalize that for other backtracking problem.
i suggest here that for all recursive solution must exist a nonrecursive. The recursive solution exist if the program that is use that recursion function run on machine with poor memory.
I actually have some code that will generate all permutations at home, I am 99% sure that it's non-recursive. But I'd have to check it tonight. I will have a check of it when I get home from work. I used it for a structural steel application I developed a few years ago.
I can have a look at it tonight and see if it is non-recursive. It was a limited solution in that it was only viable to generate all permutations for upto 30(ish) objects before the time to compute it became quite significant.
Ok. Unfortunately my code does something different. Giving a list of objects it tells you every possible unique combination you can make by joining those objects together.