MCPcopy
hub / github.com/TheAlgorithms/Go / Remove

Method Remove

structure/trie/trie.go:92–96  ·  view source on GitHub ↗

Remove zero, one or more words lazily from the Trie, no node is actually removed.

(s ...string)

Source from the content-addressed store, hash-verified

90
91// Remove zero, one or more words lazily from the Trie, no node is actually removed.
92func (n *Node) Remove(s ...string) {
93 for _, ss := range s {
94 n.remove(ss)
95 }
96}
97
98// Compact will remove unecessay nodes, reducing the capacity, returning true if node n itself should be removed.
99func (n *Node) Compact() (remove bool) {

Callers 11

ExampleNodeFunction · 0.95
TestTrieRemoveFunction · 0.95
PutMethod · 0.45
increaseFreqMethod · 0.45
eliminateMethod · 0.45
PopMethod · 0.45
DequeueMethod · 0.45
ColorUsingBFSMethod · 0.45

Calls 1

removeMethod · 0.95

Tested by 5

ExampleNodeFunction · 0.76
TestTrieRemoveFunction · 0.76