static int pathHelper(TreeNode c, int[] rec) {
		int left=c.left!=null?pathHelper(c.left,rec):Integer.MIN_VALUE;
		int right=c.right!=null?pathHelper(c.right,rec):Integer.MIN_VALUE;
		int larger=Math.max(Math.max(left,right),0);
		rec[0]=Math.max(c.val+(left>0?left:0)+(right>0?right:0),rec[0]);
		return c.val+larger;
	}