Re:Generating Permutations
by zamalek on Wednesday May 06, 2015 @03:20AM
(#9497038)
Another option is to use a factoradic[1]. The advantage with a factoradic is that you can index directly to any permutation without having to find its predecessor first.
[1]: http://en.wikipedia.org/wiki/Factorial_number_system