Check If One Binary is Mirror Tree of another Binary Tree.

Objective: – Given two binary trees check if they are mirror image of each other.





  • Do the preorder traversal on both the trees simultaneously.
  • if any node doesn’t have corresponding node in the another tree, return false.
  • check if left node in one tree is the right node in another tree, and vice verse.



Is Mirror Trees : true

3 Responses

  1. sanjib says:

    add data check for completeness of the program
    if( !{

    return false;


  2. Shilpi says:

    data check should be done after null check

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: