DSA Key Problems

Sorted Permutation Rank

Find the one-indexed lexicographic rank of a string among all permutations of its distinct characters.