static int pathSumHelper(TreeNode node, int[]rec) {
		int left=node.left==null?0:Math.max(0,pathSumHelper(node.left,rec));
		int right=node.right==null?0:Math.max(0,pathSumHelper(node.right,rec));
		int ms=node.val;
		rec[0]=Math.max(rec[0],ms+left+right);
		return ms+Math.max(left,right);
	}