Write an Function to Convert a Binary Tree into its Mirror Tree | Atrenta written Question

Mirror of a Binary Tree T1 is another Binary Tree T2 with left and right children of all non-leaf nodes interchanged.

  • Air Jordan Pas cher
  • Example –

     4 / \ 2 5 ---> / \ 1 3 4 / \ 5 2 / \ 3 1 

    Algorithm – Mirror(tree):

     1.  new balance 1600 femme blanche Call Mirror for left-subtree i.e.,  Scarpe Adidas NMD Runner Mirror(left-subtree) 2.  new balance 577 grey green orange Call Mirror for right-subtree i.e.,  Mochilas Kanken Mini Mirror(left-subtree) 3.  nike air max 1 pas cher Swap left and right subtrees. 

    Leave a Reply

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

    For Inserting code :
    Paste your code in the comment form, select it and then click the language link

    C | C++ | Java |

    *