public int maxPathSum(TreeNode root) {
	        if(root==null)
	        	return 0;
	        int left = maxPathSum(root.left);
	        int right = maxPathSum(root.right);
	        int parent = root.val;
	        if(left>0)
	        	parent +=left;
	        if(right>0)
	        	parent+=right;
	       return parent;
	    }