摘要: 题目: Given a binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any node i 阅读全文
posted @ 2017-05-11 11:35 panini 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return the postorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, return [3,2,1]. Note: Recursive 阅读全文
posted @ 2017-05-11 06:12 panini 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 题目 Given a binary tree, return the inorder traversal of its nodes' values. For example:Given binary tree [1,null,2,3], return [1,3,2]. Note: Recursive 阅读全文
posted @ 2017-05-11 05:43 panini 阅读(370) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, return the preorder traversal of its nodes' values. For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,2,3]. Note:  阅读全文
posted @ 2017-05-11 05:25 panini 阅读(125) 评论(0) 推荐(0) 编辑
摘要: DescriptionIt's follow up problem for Binary Tree Longest Consecutive Sequence IIGiven a k-ary tree, find the length of the longest consecutive sequen 阅读全文
posted @ 2017-05-11 03:22 panini 阅读(672) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a binary tree, you need to find the length of Longest Consecutive Path in Binary Tree. Especially, this path can be either increasing or dec 阅读全文
posted @ 2017-05-11 01:39 panini 阅读(315) 评论(0) 推荐(0) 编辑