Write a program to create mirror of a binary tree
Binary Tree Job Interview Questions
This resursive C code will create a new binary tree which would be the mirror copy of the previous binary tree.
mynode *copy(mynode *root)
{
mynode *temp;
if(root==NULL)return(NULL);
temp = (mynode *) malloc(sizeof(mynode));
temp->value = root->value;
temp->left = copy(root->right);
temp->right = copy(root->left);
return(temp);
}
This code will will only print the mirror of the tree
