✅Clean & Easy Code || 🔥O(1) TC, SC
\n\n# Complexity\n\n- Time complexity:\nO(1)\n\n- Space complexity:\nO(1)\n\n\n# Code\n## Please Upvote if u found it useful\uD83E\uDD17\n\nclass Solution {\npu
\n\n# Complexity\n```\n- Time complexity:\nO(1)\n\n- Space complexity:\nO(1)\n```\n\n# Code\n## Please Upvote if u found it useful\uD83E\uDD17\n```\nclass Solution {\npublic:\n    bool canBeEqual(string s1, string s2) {\n        if(s1 == s2)\n            return true;\n        string s = s1, g = s1;\n        swap(s[0], s[2]);\n        swap(g[1],g[3]);\n        if(g == s2 || s == s2)\n            return true;\n        swap(s[1], s[3]);\n        if(s == s2)\n            return true;\n        return false;\n    }\n};\n```
['C++']