LexicographicPermutations

LexicographicPermutations[l]
constructs all permutations of list l in lexicographic order.

DetailsDetails