public static int sumNumbers2(TreeNode root) {
        if(root == null) return 0;
        if(root.left == null && root.right ==null) return root.val;
        ArrayList<Integer> list = new ArrayList<Integer>();
        countLeft2(list, root.left, String.valueOf(root.val));
        countRight2(list, root.right, String.valueOf(root.val));
        int sum = 0;
		for(int num: list){
			sum += num;
		}
        return sum;
    }