Composite number order lexicographic order
Method for constructing lexicographical order
Suffix: from the far right to the first position to the right of the current position
- Speak numbers scan from right to left until the first descending number
- Swap the smallest number in the suffix greater than the current position
- Guaranteed suffix is the smallest suffix