2839. Simple C++ solution || 0ms runtime
Code\n\nclass Solution {\npublic:\n    bool canBeEqual(string s1, string s2) {\n        for(int i=0;i<2;i++)\n        {\n            if(s1[i]!=s2[i])\n         
# Code\n```\nclass Solution {\npublic:\n    bool canBeEqual(string s1, string s2) {\n        for(int i=0;i<2;i++)\n        {\n            if(s1[i]!=s2[i])\n            {\n                swap(s2[i],s2[i+2]);\n                if(s1==s2)\n                return 1;\n            }\n        }\n        return s1==s2?1:0;\n    }\n};\n```
['String', 'C++']