JavaScript Solution - Recursive
Took me awhile to get the answer. It seemed like the problem was purposely trying to mislead us to approaching this problem through simulation. \n\n\nvar flipEq
Took me awhile to get the answer. It seemed like the problem was purposely trying to mislead us to approaching this problem through simulation. <br /><br />\n\n```\nvar flipEquiv = function(root1, root2) {\n    if (root1 == null && root2 == null) return true;\n    if (root1 == null || root2 == null) return false;\n    if (root1.val != root2.val) return false;\n    \n    const regular = flipEquiv(root1.left, root2.left) && flipEquiv(root1.right, root2.right);\n    const flipped = flipEquiv(root1.left, root2.right) && flipEquiv(root1.right, root2.left);\n  \n    return regular || flipped;\n};\n```
['Recursion', 'JavaScript']