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

Method Capacity

structure/trie/trie.go:55–61  ·  view source on GitHub ↗

Capacity returns the number of nodes in the Trie

()

Source from the content-addressed store, hash-verified

53
54// Capacity returns the number of nodes in the Trie
55func (n *Node) Capacity() int {
56 r := 0
57 for _, c := range n.children {
58 r += c.Capacity()
59 }
60 return 1 + r
61}
62
63// Size returns the number of words in the Trie
64func (n *Node) Size() int {

Callers 3

ExampleNodeFunction · 0.95
TestTrieRemoveFunction · 0.95
verifySizeCapaMethod · 0.95

Calls

no outgoing calls

Tested by 3

ExampleNodeFunction · 0.76
TestTrieRemoveFunction · 0.76
verifySizeCapaMethod · 0.76