Generating permutations and combinations in lexicographical order
Alon ItaiJournal of the Brazilian Computer Society2001
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.