public BinaryTree MirorCopyOfTree(BinaryTree T) {
BinaryTree newTree = new BinaryTree(T.data);
if(T.left!=null)
newTree.right=MirorCopyOfTree(T.left);
if(T.right!=null)
newTree.left=MirorCopyOfTree(T.right);
return newTree;
}
No comments:
Post a Comment