✅ Easy & clean Solution in C++ 🔥
Please Upvote\uD83D\uDC4D\uD83D\uDC4D\n\nThanks for visiting my solution.\uD83D\uDE0A Keep Learning\nPlease give my solution an upvote! \uD83D\uDC4D\nIt\'s a si
Please Upvote\uD83D\uDC4D\uD83D\uDC4D\n```\nThanks for visiting my solution.\uD83D\uDE0A Keep Learning\nPlease give my solution an upvote! \uD83D\uDC4D\nIt\'s a simple way to show your appreciation and\nkeep me motivated. Thank you! \uD83D\uDE0A\n```\n\n```\nclass Solution {\npublic:\n    bool canBeEqual(string s1, string s2) {\n        if(s1[0]!=s2[0]){\n            swap(s1[0],s1[2]);\n        }\n        if(s1[1]!=s2[1]){\n            swap(s1[1],s1[3]);\n        }\n        return s1==s2;\n    }\n};\n```\n\n![image](https://assets.leetcode.com/users/images/d662244c-c4ac-4672-81ca-4443efd169e5_1693704446.5236347.png)\n\n
['Two Pointers', 'C']