Combinatorica`
Combinatorica`

NextPermutation

NextPermutation[p]

gives the permutation following p in lexicographic order.

更多信息和选项