C++ | Eazzy Peazzy Solution | unordered_map
Code\n\nclass Solution {\npublic:\n    bool canBeEqual(string s1, string s2) {\n        unordered_map<char, int> mp11, mp12, mp21, mp22;\n        \n        for(
# Code\n```\nclass Solution {\npublic:\n    bool canBeEqual(string s1, string s2) {\n        unordered_map<char, int> mp11, mp12, mp21, mp22;\n        \n        for(int i = 0; i < s1.size(); i++) {\n            if(i&1) {\n                mp12[s1[i]]++;\n                mp22[s2[i]]++;\n            }\n            else {\n                mp11[s1[i]]++;\n                mp21[s2[i]]++;\n            }\n        }\n        \n        return (mp11 == mp21) && (mp12 == mp22);\n    }\n};\n```
['C++']