Permutation Sequence at Twitter

Hard52.1% acceptance

This problem has 100.0% frequency at Twitter.

Problem Description

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 for `n = 3`: 1. `"123"` 2. `"132"` 3. `"213"` 4. `"231"` 5. `"312"` 6. `"321"` Given `n` and `k`, return the `kth` permut...

Read full problem and hints

Topics

Also asked at 6 companies


More Twitter Questions

View all Twitter questions