Given two strings s and t, where t is generated by shuffling s and adding one extra letter, return the extra letter. Pattern focus: XOR Trick. XOR character codes to cancel matched characters and reveal the extra one.
s = original string, t = shuffled string with one extra character
the extra character
Example 1:
Input:
s = "abcd" t = "abcde"
Output:
e
Explanation:
Only 'e' appears in t and not in s.
Example 2:
Input:
s = "" t = "y"
Output:
y
Explanation:
The added character is the whole result.