@@ -0,0 +1,899 @@
+package org.pilgrim.leetcode.y2020.facebook;%0A%0Apublic class MaxPathSumBinarryTree %7B%0A    %0A    public static class TreeNode%7B%0A        int val;%0A        TreeNode left;%0A        TreeNode right;%0A        TreeNode()%7B%7D%0A        TreeNode(int val) %7Bthis.val = val;%7D%0A    %7D%0A    %0A    int maxSum = Integer.MIN_VALUE;%0A    %0A    public int getMaxSumTreePath(TreeNode node) %7B%0A        maxSumHelper(node);%0A        %0A        return maxSum;%0A    %7D%0A    %0A    private int maxSumHelper(TreeNode node) %7B%0A        if(node == null) %7B%0A            return 0;%0A        %7D%0A        %0A        int leftMax = Math.max(maxSumHelper(node.left), 0);%0A        int rightMax = Math.max(maxSumHelper(node.right), 0);%0A        %0A        int newMax = node.val + leftMax + rightMax;%0A        maxSum = Math.max(newMax, maxSum);%0A        %0A        return node.val + Math.max(leftMax, rightMax);%0A        %0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A%0A    %7D%0A%0A%7D%0A

add max sum helper