Well-Commented Code || O(1)
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\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        // Check if the input strings are already equal.\n        if (s1 == s2)\n            return true;\n\n        // Iterate through the first 4 characters of the strings.\n        for (int i = 0; i < 4; i++) {\n            // If the characters at the current position are not equal:\n            if (s1[i] != s2[i]) {\n                // Check if swapping the current character and the character two positions ahead\n                // (i+2) in s1 would make the strings equal. This condition is used to prevent\n                // accessing out-of-bounds characters in the string.\n                if (i + 2 >= 4)\n                    return false;\n\n                // Swap the characters in s1.\n                swap(s1[i], s1[i + 2]);\n            }\n        }\n\n        // Check if the modified s1 string is now equal to s2.\n        return s1 == s2;\n    }\n};\n\n```
['C++']