C++ 0ms 100% Easiest Code
\nclass Solution {\npublic:\n    \n    bool Solve(TreeNode* A, TreeNode*B)\n    {\n        if(A==NULL && B==NULL)\n            return true ;\n        \n        
```\nclass Solution {\npublic:\n    \n    bool Solve(TreeNode* A, TreeNode*B)\n    {\n        if(A==NULL && B==NULL)\n            return true ;\n        \n        if(A==NULL || B==NULL)\n            return false ;\n        \n        if(A->val != B->val)\n            return false; \n        \n        return Solve(A->left,B->left)&Solve(A->right,B->right) | Solve(A->left,B->right)&Solve(A->right,B->left) ;\n    }\n    \n    bool flipEquiv(TreeNode* root1, TreeNode* root2) {\n        return Solve(root1,root2) ;\n    }\n};\n```
[]