Skip to content

Latest commit

 

History

History
17 lines (17 loc) · 331 Bytes

README.md

File metadata and controls

17 lines (17 loc) · 331 Bytes
class Solution {
public:
    bool isIsomorphic(string s, string t) {
        int n = s.size();
        if (n == 0) return true;
        int i = 0;
        while (i < n) {
            if (s.find(s[i]) != t.find(t[i])) {
                return false;
            }
            i++;
        }
        return true;
    }
};