Kth Permutation
给定 n 和 k,求123..n
组成的排列中的第k个排列
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.
Example
Example 1:
Example 2:
Note
To be revisited...
Code
Last updated