```
class Solution {
public:
bool isIsomorphic(string s, string t)
{
// if s[i]->t[i], then map s[i] and t[i] to the same integer;
// if s[i] is not mapped, but t[i]!=0, then it's not a one-to-one mapping, return false;
int map_s[256] = {0};
int map_t[256] = {0};
for(int i=0; i<s.size(); i++)
{
if(map_s[ s[i] ] && map_s[ s[i] ] == map_t[ t[i] ])
continue;
if(!map_s[ s[i] ] && !map_t[ t[i] ])
{
map_s[ s[i] ] = i+1;
map_t[ t[i] ] = i+1;
continue;
}
return false;
}
return true;
}
};
```