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

Struct RBNode

structure/tree/rbtree.go:25–31  ·  view source on GitHub ↗

RBNode represents a single node in the RB.

Source from the content-addressed store, hash-verified

23
24// RBNode represents a single node in the RB.
25type RBNode[T constraints.Ordered] struct {
26 key T
27 parent *RBNode[T]
28 left *RBNode[T]
29 right *RBNode[T]
30 color Color
31}
32
33func (n *RBNode[T]) Key() T {
34 return n.key

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected