{8,6,10,5,7,9,11}
{8,10,6,11,9,7,5}
如题面所示
{}
class Solution: def Mirror(self , pRoot ): if pRoot == None: return None pRoot.left, pRoot.right = pRoot.right, pRoot.left pRoot.left = self.Mirror(pRoot.left) pRoot.right = self.Mirror(pRoot.right) return pRoot
这道题你会答吗?花几分钟告诉大家答案吧!
扫描二维码,关注牛客网
下载牛客APP,随时随地刷题