Find the one extra character that appears in a shuffled version of a string.
Given two strings and , where is formed by shuffling the characters of and adding exactly one extra character at an arbitrary position, identify the extra character.
Return that character as a single-letter string.
Example 1
Input
s = "abcd", t = "abcde"
Output
"e"
Explanation
The string t contains every character from s plus one extra character, e.
Example 2
Input
s = "ae", t = "aea"
Output
"a"
Explanation
The extra character in t is a.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.