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

Function NewAVL

structure/tree/avl.go:54–59  ·  view source on GitHub ↗

NewAVL creates a novel AVL tree

()

Source from the content-addressed store, hash-verified

52
53// NewAVL creates a novel AVL tree
54func NewAVL[T constraints.Ordered]() *AVL[T] {
55 return &AVL[T]{
56 Root: nil,
57 _NIL: nil,
58 }
59}
60
61// Empty determines the AVL tree is empty
62func (avl *AVL[T]) Empty() bool {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected