if (s.size() != t.size()) return false; char dict[128] = {0}; for (int i = 0;i < s.size(); ++i) { if (dict[s[i]] == 0) dict[s[i]] = t[i]; else if (dict[[si]] != t[i]) return false; } return true;