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

Method addEdge

graph/lowestcommonancestor.go:37–40  ·  view source on GitHub ↗
(u, v int)

Source from the content-addressed store, hash-verified

35}
36
37func (tree *Tree) addEdge(u, v int) {
38 tree.edges[u] = append(tree.edges[u], v)
39 tree.edges[v] = append(tree.edges[v], u)
40}
41
42func (tree *Tree) dfs(u, par int) {
43 tree.jump[0][u] = par

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected