摘要: Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest l 阅读全文
posted @ 2017-10-28 09:48 乐乐章 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 思路 难度简单 1239 给你两棵二叉树: root1 和 root2 。 想象一下,当你将其中一棵覆盖到另一棵之上时,两棵树上的一些节点将会重叠(而另一些不会)。你需要将这两棵树合并成一棵新二叉树。合并的规则是:如果两个节点重叠,那么将这两个节点的值相加作为合并后节点的新值;否则,不为 null 阅读全文
posted @ 2017-10-28 09:42 乐乐章 阅读(106) 评论(0) 推荐(0) 编辑