[Leetcode] Binary Tree Maximum Path Sum

Question:

Given 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   3

Return 6.

给出一个二叉树,找到其中的最大路径和。

路径可以从树中任意一个节点开始和结束。

例如:

给出如下二叉树,

       1

      /

    2    3

返回6

原文地址:https://www.cnblogs.com/Phoebe815/p/3786405.html