Possible Duplicate:
Generating permutations of a set (most efficiently)
I was looking at an old programming challenge, and I was trying to come up with a solution. The challenge is expired, and years old, and I'm doing it just to build skill at this point.
I need to generate numbers in the following pattern:
- 123456789
 - 123456798
 - 123456879
 - 123456897
 - 123456978
 - 123456987
 
Continuing onward, always using the same 9 numbers, never duplicating them, and always grabbing the next one in line.
I've been wracking my brain for the last 2 hours, and can't figure out a good programming pattern to tackle this.
Any suggestions?