Find the Difference

Easy

String t is produced by shuffling s and adding one extra letter.

Return that extra letter.

Example 1

findTheDifference()
Input
s = "abcd", t = "abcde"
Output
"e"

Example 2

findTheDifference()
Input
s = "", t = "y"
Output
"y"
Constraints
0 <= s.length <= 1000
t.length === s.length + 1
Both strings are lowercase English letters.

Topics

StringsHash TableBit Manipulation

Implement findTheDifference in the editor and return the answer — printing it is never graded.