Possible Duplicate:
Listing all permutations of a string/integer
I need to know an efficient algorithm to obtain the permutations from 1 to a given number n, for example if the given number is 3, obtain 123, 132, 312, 321, 231, 213 and so on with any number n up to 200. Thanks in advance for any help you can provide.