思路是字符串转成数字串。
只要结构相同即可。
string toInt(string s){
vector<int> table(128,0);
int tmp = 0;
for(int i=0;i<s.size();i++){
if(table[s[i]]==0){
table[s[i]] = ++tmp;
}
s[i] = table[s[i]];
}
return s;
}
bool isIsomorphic(string s, string t) {
if(s.size()!=t.size()) return false;
if(toInt(s)!=toInt(t)) return false;
return true;
}