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

Method Append

structure/tree/btree.go:100–104  ·  view source on GitHub ↗
(key T, child *BTreeNode[T])

Source from the content-addressed store, hash-verified

98}
99
100func (node *BTreeNode[T]) Append(key T, child *BTreeNode[T]) {
101 node.keys[node.numKeys] = key
102 node.children[node.numKeys+1] = child
103 node.numKeys++
104}
105
106// Add all of other's keys starting from idx and children starting from idx + 1
107func (node *BTreeNode[T]) Concat(other *BTreeNode[T], idx int) {

Callers 2

MergeMethod · 0.80
DeleteMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected