Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Notice that for anagrams, the order of the letters is irrelevant.
For each letter, we can count its frequency in s and t.
For each letter, its contribution to the answer is the absolute difference between its frequency in s and t.