We\'re given a string and a permutation of the string.
For example, an input string sandeep and a permutation psdenae.
sandeep
psdenae
Find the pos
My approach to the problem is sort the given permutation. Number of swappings of the characters in the string will give us the position of the pemutation in the sorted list of permutations.