MCPcopy
hub / github.com/TheAlgorithms/JavaScript / addNode

Method addNode

Graphs/BinaryLifting.js:24–27  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

22 }
23
24 addNode(node) {
25 // Function to add a node to the tree (connection represented by set)
26 this.connections.set(node, new Set())
27 }
28
29 addEdge(node1, node2) {
30 // Function to add an edge (adds the node too if they are not present in the tree)

Callers 1

addEdgeMethod · 0.95

Calls 1

setMethod · 0.45

Tested by

no test coverage detected