MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / Problem18

Function Problem18

project_euler/problem_18/problem18.go:50–63  ·  view source on GitHub ↗
(input []string, deep int)

Source from the content-addressed store, hash-verified

48)
49
50func 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}

Callers 2

TestProblem18_FuncFunction · 0.85
BenchmarkProblem18_FuncFunction · 0.85

Calls 3

BFSInsertMethod · 0.95
MaxPathValueSearchMethod · 0.95
NodeValueTypeAlias · 0.85

Tested by 2

TestProblem18_FuncFunction · 0.68
BenchmarkProblem18_FuncFunction · 0.68