✅ C++ || Simple loop
Code\nc++\nclass Solution {\npublic:\n    bool canBeEqual(string l, string r) {\n        for (int i = 0; i < l.size(); i++) \n            if (l[i] != r[i]) \n  
**Code**\n```c++\nclass Solution {\npublic:\n    bool canBeEqual(string l, string r) {\n        for (int i = 0; i < l.size(); i++) \n            if (l[i] != r[i]) \n                if (i + 2 < l.size())\n                    if (l[i + 2] == r[i]) swap(l[i + 2], l[i]);\n                    else if (r[i + 2] == l[i]) swap(r[i + 2], r[i]);\n                    else return false;\n                else return false;\n        return true;\n    }\n};\n```\n\n**For more solutions and concepts, check out this \uD83D\uDCD6 [BLOG](https://github.com/MuhtasimTanmoy/notebook)  and  \uD83C\uDFC6 [GITHUB REPOSITORY](https://github.com/MuhtasimTanmoy/playground) with over 2000+ solutions.**
[]