Looking for good programming challenges?

Use the search below to find our solutions for selected questions!

All posts in Algorithms

Finding n-th permutation without computing others

Given S of size n and k, return the kth lexicographic permutation sequence. (Note: Given n will be between 1 and 10 inclusive.) For n = 10 variable symbols we have 10! possible permutations. The first step is to find the first symbol. If we fix a first symbol, then . . . Read more