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

Struct AVLNode

structure/tree/avl.go:18–24  ·  view source on GitHub ↗

AVLNode represents a single node in the AVL.

Source from the content-addressed store, hash-verified

16
17// AVLNode represents a single node in the AVL.
18type AVLNode[T constraints.Ordered] struct {
19 key T
20 parent *AVLNode[T]
21 left *AVLNode[T]
22 right *AVLNode[T]
23 height int
24}
25
26func (n *AVLNode[T]) Key() T {
27 return n.key

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected