原题链接:Find the Difference
题解:
class Solution {
public:
char findTheDifference(string s, string t) {
/*
Time Complexity:O(m+n)
Space Complexity:O(1)
*/
char r=0;
for(auto &c:s)r^=c;
for(auto &c:t)r^=c;
return r;
}
};