Faster than 100%, simple c++
Strings are equal if there are 0 differences or 2 differences and each string uses the same characters.\n\nclass Solution {\npublic:\n    bool areAlmostEqual(st
Strings are equal if there are 0 differences or 2 differences and each string uses the same characters.\n```\nclass Solution {\npublic:\n    bool areAlmostEqual(string s1, string s2) {\n        if (s1 == s2) return true;\n        int diff = 0; // different characters at each position\n        \n        unordered_set<char> a, b;\n        \n        for (size_t i = 0; i < s1.size(); i++) {\n            if (s1[i] != s2[i]) diff++;\n            a.insert(s1[i]);\n            b.insert(s2[i]);\n        }\n        \n        return (diff == 0 || diff == 2) && a == b;\n    }\n};\n```
['C']