摘要: Given a root node reference of a BST and a key, delete the node with the given key in the BST. Return the root node reference (possibly updated) of th 阅读全文
posted @ 2017-11-17 10:51 乐乐章 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 题目描述 操作给定的二叉树,将其变换为源二叉树的镜像。 输入描述:二叉树的镜像定义:源二叉树 8 / \ 6 10 / \ / \ 5 7 9 11 镜像二叉树 8 / \ 10 6 / \ / \ 11 9 7 5思路: 交换 左右节点。 然后递归的去调用Mirror函数 边界条件是:遍历到叶子节 阅读全文
posted @ 2017-11-17 09:54 乐乐章 阅读(126) 评论(0) 推荐(0) 编辑