操作给定的二叉树,将其变换为原二叉树的镜像。
class TreeNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def Mirror(self,root):
if root == None:
return None
root.left, root.right = root.right, root.left
self.Mirror(root.left)
self.Mirror(root.right)