1、将s和t所有字符异或起来,最后得到的就是多出来的字符
class Solution {
public:
char findTheDifference(string s, string t) {
int sum=0,i=0;
while(s[i]!='\0') sum^=s[i++];
i=0;
while(t[i]!='\0') sum^=t[i++];
return sum;
}
};