其实前序遍历也可以 func Mirror( pRoot *TreeNode ) *TreeNode { // write code here if pRoot == nil { return nil } pRoot.Left,pRoot.Right = pRoot.Right,pRoot.Left Mirror(pRoot.Left) Mirror(pRoot.Right) return pRoot }
点赞

相关推荐

小牛炒肉:好大的官威居然不是什么官
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务