Geek, programmer, foss enthusiast, loves Python,
Ex-Microsoft Student Partner, Ex-National Instruments.
You can
Subscribe to my blog,
Follow me on twitter. More about me here.
Johnson trotter algorithm gives a non recursive approach to generate permutations. The algorithm goes something like this..
I'm using a character flag to maintain the direction of the mobile integers.. the code is simple, suggestions to make it more simple are always welcome 