(input []string, deep int)
| 48 | ) |
| 49 | |
| 50 | func Problem18(input []string, deep int) int { |
| 51 | tree := &Tree{} |
| 52 | |
| 53 | for _, num := range input { |
| 54 | v, err := strconv.Atoi(num) |
| 55 | if err != nil { |
| 56 | panic(err) |
| 57 | } |
| 58 | |
| 59 | tree.BFSInsert(NodeValue(v)) |
| 60 | } |
| 61 | |
| 62 | return tree.MaxPathValueSearch(deep) |
| 63 | } |