摘要:
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 阅读全文
摘要:
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 阅读全文
摘要:
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ public class Solution { ... 阅读全文
摘要:
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 阅读全文