Available question text
Given two strings s and t where t is a permutation of s and each character is unique, compute the permutation difference defined as the sum over all characters of the absolute difference between their indices in s and t. This is essentially an index-mapping problem: map each character to its position in s and sum |pos_s[c] - pos_t[c]| for all characters (n ≤ 26).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3146. Permutation Difference between Two Strings
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source