C++ Track Mismatches
Every time we see a missmatch - store it in an array.\n\nIn the end, we can eather have zero missmaches, or two mirrored missmatches.\n\nOtherwise, we cannot ma
Every time we see a missmatch - store it in an array.\n\nIn the end, we can eather have zero missmaches, or two mirrored missmatches.\n\nOtherwise, we cannot make strings equal.\n\n```cpp\nbool areAlmostEqual(string s1, string s2) {\n    vector<array<char, 2>> mis;\n    for (auto i = 0; i < s1.size() && mis.size() < 3; ++i)\n        if (s1[i] != s2[i])\n            mis.push_back({mis.empty() ? s1[i] : s2[i], mis.empty() ? s2[i] : s1[i]});\n    return mis.empty() || (mis.size() == 2 && mis[0] == mis[1]);\n}\n```
[]