Given a binary tree T, find the maximum path sum.
The path may start and end at any node in the tree.
1 <= Number of Nodes <= 7e4
-1000 <= Value of Node in T <= 1000
The first and the only argument contains a pointer to the root of T, A.
Return an integer representing the maximum sum path.
1 / \ 2 3
20 / \ -10 20 / \ -10 -50
The path with maximum sum is: 2 -> 1 -> 3
The path with maximum sum is: 20 -> 20
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.