Permutation algorithm without recursion? Java
- by Andreas Hornig
Hi,
I would like to get all combination of a number without any repetation.
Like 0.1.2, 0.2.1, 1.2.0, 1.0.2, 2.0.1, 2.1.0.
I tried to find an easy scheme but couldn't find so I drawed a graph/tree for it and this screams to use recursion.
But I would like to do it without, if this is possible.
So could anyone please help me how to do that?
Thank you in advance,
Andreas