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

Method Insert

project_euler/problem_18/root.go:40–46  ·  view source on GitHub ↗
(node Node)

Source from the content-addressed store, hash-verified

38}
39
40func (n *Root) Insert(node Node) {
41 if n.NodeLeft == nil {
42 n.NodeLeft = node.(*Edge)
43 } else {
44 n.NodeRight = node.(*Edge)
45 }
46}
47
48func (n *Root) HasSpace() bool {
49 return n.NodeLeft == nil || n.NodeRight == nil

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected