You are given two strings s and t such that every character in s is unique and t is a permutation of s.
The permutation difference between s and t is defined as the sum of the absolute differences between the index of each character in s and the index of the identical character in t.
Return the permutation difference between s and t.
Constraints:
s.length
Each character occurs at most once in s.
t is a permutation of s.
s consists only of lowercase English letters.
You are given two strings s and t such that every character in s is unique and t is a permutation of s.
The permutation difference between s and t is defined as the sum of the absolute differences between the index of each character in s and the index of the identical character in t.
Return the permutation difference between s and t.
Constraints:
s.length
Each character occurs at most once in s.
t is a permutation of s.
s consists only of lowercase English letters.