摘要: Binary Tree Maximum Path SumGiven a binary tree, find the maximum path sum.The path may start and end at any node in the tree. For example: Given the below binary tree, 1 / \ 2 3Return 6.递归求解。maxPathSum(root)跟maxPathSum(root.left)和maxPathSum(root.right)之间的关系:root左子树的maxPath,右子树的maxP... 阅读全文
posted @ 2013-06-21 23:47 wlu 阅读(2340) 评论(0) 推荐(0) 编辑