
class Solution:
# 返回镜像树的根节点
def Mirror(self, root):
# write code here
if root == None:
return root
temp = self.Mirror(root.right)
root.right = self.Mirror(root.left)
root.left = temp
return root
网友评论