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

Struct AVL

structure/tree/avl.go:48–51  ·  view source on GitHub ↗

AVL represents a AVL tree. By default, _NIL = nil.

Source from the content-addressed store, hash-verified

46// AVL represents a AVL tree.
47// By default, _NIL = nil.
48type AVL[T constraints.Ordered] struct {
49 Root *AVLNode[T]
50 _NIL *AVLNode[T] // a sentinel value for nil
51}
52
53// NewAVL creates a novel AVL tree
54func NewAVL[T constraints.Ordered]() *AVL[T] {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected