Generating permutations and combinations in lexicographical order
Alon Itai · Journal of the Brazilian Computer Society · 2001
We consider producing permutations and combinations in lexicographical order. Except for the array that holds the combinatorial object, we require only O(1) extra storage. The production of the next item requires O(1) amortized time.