Problem of the day for today is k^{th} permutation: *Given numbers n and k, 1 <= k < INT_MAX, return k ^{th} permutation of the set [1,2,…,n]*. For example, given n=3 and k=4, the permutations of [1,2,3] in order are:

- “123”
- “132”
- “213”
- “231”
- “312”
- “321”

k=4^{th} permutation is “231”. To simplify the output, a string concatenation of the numbers is returned.

Advertisements