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

Method Delete

structure/tree/rbtree.go:80–82  ·  view source on GitHub ↗

Delete a node of Red-Black Tree Returns false if the node does not exist, otherwise returns true.

(data T)

Source from the content-addressed store, hash-verified

78// Delete a node of Red-Black Tree
79// Returns false if the node does not exist, otherwise returns true.
80func (t *RB[T]) Delete(data T) bool {
81 return t.deleteHelper(t.Root, data)
82}
83
84// Get a Node from the Red-Black Tree
85func (t *RB[T]) Get(key T) (Node[T], bool) {

Callers

nothing calls this directly

Calls 1

deleteHelperMethod · 0.95

Tested by

no test coverage detected