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

Method Depth

structure/tree/avl.go:126–128  ·  view source on GitHub ↗

Depth returns the calculated depth of the AVL tree

()

Source from the content-addressed store, hash-verified

124
125// Depth returns the calculated depth of the AVL tree
126func (avl *AVL[T]) Depth() int {
127 return calculateDepth[T](avl.Root, avl._NIL, 0)
128}
129
130// Max returns the Max value of the tree
131func (avl *AVL[T]) Max() (T, bool) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected