Best C++ Soln. || Time - O(N) || Space - O(1)
Intuition\n    Two Pointer\n\n# Approach\nJust traverse the s1 whole and swap with (ind + 2)%4 to get the every possible string as per the given conditon, In be
# Intuition\n    Two Pointer\n\n# Approach\nJust traverse the s1 whole and swap with (ind + 2)%4 to get the every possible string as per the given conditon, In between if it matches with the second string then return true else return false after coming out of the loop.\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(N)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    bool canBeEqual(string s1, string s2) {\n        for(int i{0}; i < 4; ++i)\n        {\n            int j = (i+2)%4;  \n            swap(s1[i], s1[j]);\n            if(s1 == s2)    return true;\n        }\n        return false;\n    }\n};\n```
['Two Pointers', 'String', 'C++']