public int recursiveTraversal(TreeNode root, int sum){
	if(root == null){
		return 0;
	}
	
	if (root.left == null && root.right == null ){
		return root.val + 10*sum;
	}
	else{
		return recursiveTraversal(root.left,sum*10+root.val)+recursiveTraversal(root.right,sum*10+root.val);
		
	}
}