previous |
start |
next
Handling the Special Case
When the tail generator runs out of permutations, we need to:
- Increment the current position
- Compute the tail string that contains all letters except for
the current one
- Make a new permutation generator for the tail string
previous |
start |
next