https://leetcode.com/problems/sum-root-to-leaf-numbers


Runtime: 0 ms, faster than 100.00% of Go online submissions for Sum Root to Leaf Numbers.
Memory Usage: 2.3 MB, less than 35.65% of Go online submissions for Sum Root to Leaf Numbers.


```go
/**
 * Definition for a binary tree node.
 * type TreeNode struct {
 *     Val int
 *     Left *TreeNode
 *     Right *TreeNode
 * }
 */
var result = 0

func travel(sum_list []string, node *TreeNode) {
	if node == nil {

	} else {
		sum_list = append(sum_list, strconv.Itoa(node.Val))
		if node.Left != nil {
			travel(sum_list, node.Left)
		}
		if node.Right != nil {
			travel(sum_list, node.Right)
		}
		if node.Left == nil && node.Right == nil {
			sum_string := ""
			for _, each := range sum_list {
				sum_string += each
			}
			i, _ := strconv.Atoi(sum_string)
			result += i
		}
	}
}

func sumNumbers(root *TreeNode) int {
	//7:55
	result = 0
	travel(make([]string, 0), root)
	return result
	//8:01
    //debug until 8:04
}
```
