public class Solution {
public void Mirror(TreeNode root) {
//节点为空返回
if(root==null)
return;
TreeNode temp;
//交换左右节点
temp=root.left;
root.left=root.right;
root.right=temp;
//如果左子树还有子节点,在来一次
Mirror(root.left);
//如果右子树还有子节点,在来一次
Mirror(root.right);
}
}