版权声明:本文为博主原创文章,转载请注明出处:http://blog.jerkybible.com/2013/10/09/2013-10-09-CODE 73 Permutation Sequence/
The set [1,2,3,…,n]
contains a
total of n! unique permutations.
By listing and labeling all of the permutations in order,
We get the following sequence (ie, for n = 3):
"123"
"132"
"213"
"231"
"312"
"321"
Given n and k, return the kth permutation sequence.
Note: Given n will be between 1 and 9 inclusive.
|
|