389. Find the Difference

Practice Find the Difference for free on NudgeCode: Easy, Bit Manipulation pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.

String t is made by shuffling the letters of s and inserting one extra lowercase letter at some position. Return that extra letter. The extra letter may already occur in s, and s may be empty.

Example

s = "abcd", t = "abcde"  ->  "e"
s = "",     t = "y"      ->  "y"
s = "aa",   t = "aaa"    ->  "a"

Constraints