MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / CreateChild

Method CreateChild

project_euler/problem_18/root.go:26–34  ·  view source on GitHub ↗
(value NodeValue, id int)

Source from the content-addressed store, hash-verified

24}
25
26func (n *Root) CreateChild(value NodeValue, id int) Node {
27 return &Edge{
28 ID: id,
29 NodeValue: value,
30 Parent: n,
31 NodeLeft: nil,
32 NodeRight: nil,
33 }
34}
35
36func (n *Root) GetID() int {
37 return n.ID

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected