FunctionRacerProblemsRace

Minimum Steps to Make Two Strings Anagrams

EasyHash mapsPython, JavaScript, TypeScript, Java, C++

s and t have the same length. In one step you replace any one character of t by any other letter. Return the fewest steps needed to make t an anagram of s.

Example 1

s "bab"
t "aba"
returns 1

Change one a in t into b.

Example 2

s "abc"
t "abc"
returns 0

Already an anagram.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Hash maps problems