Problem 3146 · Easy

Permutation Difference between Two Strings

Sum the absolute index gaps of each character between s and its permutation t.

Open the interactive visualisation