上一页 1 ··· 5 6 7 8 9
摘要: 给定两个二叉树,并想象当你把其中一个覆盖另一个时,两个树的一些节点是重叠的,而另一个没有。 您需要将它们合并成一个新的二叉树。合并规则是如果两个节点重叠,则sum节点值作为合并节点的新值。否则,NOT空节点将被用作新树的节点。 示例1: 阅读全文
posted @ 2017-10-10 21:30 im.lhc 阅读(263) 评论(0) 推荐(0) 编辑
摘要: LeetCode 538. Convert BST to Greater Tree (把二叉搜索树转换成较大树) 转载 Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the 阅读全文
posted @ 2017-10-10 19:52 im.lhc 阅读(257) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9