// Source : https://leetcode-cn.com/problems/find-the-difference/
// Date : 2021-11-10
class Solution {
public:
char findTheDifference(string s, string t) {
for(int i = 0;i < s.size(); ++i)
{
//从s串遍历,将t串中对应的字符置特殊标记
int index = t.find(s[i]);
t[index] = '0';
}
char a;
//遍历t串,找出没有特殊标记的字符即为新添加的字符
for(char ch:t)
if(ch - 'a' >= 0)
a = ch;
return a;
}
};



