Search
⌘K

Leetcode 60. Permutation Sequence

Return the k-th lexicographic permutation of [1..n] without generating all permutations — compute it directly by greedily selecting each digit using combinatorial block sizes (factorial number system) to skip groups of permutations.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.