# Permutation Sequence

## Question

### Problem Statement

Given n and k, return the k-th permutation sequence.

#### Example

For n = 3, all permutations are listed as follows:

"123"
"132"
"213"
"231"
"312"
"321"

If k = 4, the fourth permutation is "231"

#### Note

n will be between 1 and 9 inclusive.

#### Challenge

O(n*k) in time complexity is easy, can you do it in O(n^2) or less?

## 题解

### 源码分析

1. 建阶乘数组
2. 生成排列数字数组
3. 从高位到低位计算排列数值