2017年6月7日

摘要: Note: This question is good summary for this kind of problem. 1) Once you get the root, loop through all the children. Get the max up/down/max from th 阅读全文
posted @ 2017-06-07 08:50 codingEskimo 阅读(101) 评论(0) 推荐(0) 编辑
摘要: Note: O(n) This question is the extension of the version one. The longest consecutive Sequence could be found in "Parent->Children" or "Children -> Pa 阅读全文
posted @ 2017-06-07 07:54 codingEskimo 阅读(108) 评论(0) 推荐(0) 编辑
摘要: /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ public class Solution { ... 阅读全文
posted @ 2017-06-07 06:22 codingEskimo 阅读(78) 评论(0) 推荐(0) 编辑
摘要: Note: This is question is very similar to LCA original. The only difference is that the node may not exist. So if the node is not exsit, of course the 阅读全文
posted @ 2017-06-07 05:45 codingEskimo 阅读(137) 评论(0) 推荐(0) 编辑

导航