C++ || Observation ||
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```\n#define all(v) (v).begin(),(v).end()\nclass Solution {\npublic:\n    bool canBeEqual(string s1, string s2) {\n        vector<char>e1;\n        vector<char>o1;\n        vector<char>e2;\n        vector<char>o2;\n        for(int i=0;i<s1.length();i++){\n            if(i&1)\n                o1.push_back(s1[i]);\n            else\n                e1.push_back(s1[i]);\n        }\n        for(int i=0;i<s2.length();i++){\n            if(i&1)\n                o2.push_back(s2[i]);\n            else\n                e2.push_back(s2[i]);\n        }\n        sort(all(e1));\n        sort(all(o1));\n        sort(all(e2));\n        sort(all(o2));\n        return e1==e2 and o1==o2;\n    }\n};\n```
['C++']