simple and easy C++ solution || DFS
\n# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n###### Let\'s Connect on Linkedin: www.linkedin.com/in/shishirrsiam\n\n\n\n# Code\ncpp []\nclass Solutio
\n# if it\'s help, please up \u2B06 vote! \u2764\uFE0F\n###### Let\'s Connect on Linkedin: www.linkedin.com/in/shishirrsiam\n\n\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    void DFS(TreeNode* root, unordered_map<int, set<int>>&store, int parent)\n    {\n        if(!root) return;\n        store[parent].insert(root->val);\n        DFS(root->left, store, root->val);\n        DFS(root->right, store, root->val);\n    }\n    bool flipEquiv(TreeNode* root1, TreeNode* root2) \n    {\n        unordered_map<int, set<int>>store1, store2;\n        DFS(root1, store1, -1);\n        DFS(root2, store2, -1);\n\n        return store1 == store2;\n    }\n};\n```
['Tree', 'Depth-First Search', 'Binary Tree', 'C++']