If you sort the input list n in lexicographic order, the permutations will be created in lexicographic order.

Martin McBride
Martin McBride

No responses yet