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