Easy approach to solve this problem :)
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# Definition for a binary tree node.\n# class TreeNode:\n#     def __init__(self, val=0, left=None, right=None):\n#         self.val = val\n#         self.left = left\n#         self.right = right\nclass Solution:\n    def flipEquiv(self, root1: Optional[TreeNode], root2: Optional[TreeNode]) -> bool:\n\n        def checkEqual(root1, root2):\n            # check both the roots are not available\n            if not root1 and not root2:\n                return True\n\n            # check both the roots are values with each other\n            if not root1 or not root2 or root1.val != root2.val:\n                return False\n\n            #  \n            case1 = (checkEqual(root1.left,root2.left) and checkEqual(root1.right , root2.right) )\n\n            case2 = (checkEqual(root1.left,root2.right) and checkEqual(root1.right , root2.left) )\n            \n            return case1 or case2\n        \n        return checkEqual(root1,root2)\n```
['Python3']