FunctionRacerProblemsRace

Find the Added Letter

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

String t was made by shuffling the letters of s and then inserting exactly one extra letter at a random place. Return the extra letter.

Example 1

s "abcd"
t "abcde"
returns "e"

e is the new letter.

Example 2

s "aab"
t "abaa"
returns "a"

There is one more a in t.

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