Mirror Tree

Recursive

Iterative

public boolean isMirrorImage(Node root1, Node root2) {
 if (root1 == null && root2 == null) {
   return true;
 }
 if (root1 != null && root2 != null && root1.val == root2.val) {
   return isMirrorImage(root1.left, root2.right) && isMirrorImage(root1.right, root2.left);
 }
 return false;
}