MCPcopy Index your code
hub / github.com/TheAlgorithms/Go / Max

Method Max

structure/tree/avl.go:131–138  ·  view source on GitHub ↗

Max returns the Max value of the tree

()

Source from the content-addressed store, hash-verified

129
130// Max returns the Max value of the tree
131func (avl *AVL[T]) Max() (T, bool) {
132 ret := maximum[T](avl.Root, avl._NIL)
133 if ret == avl._NIL {
134 var dft T
135 return dft, false
136 }
137 return ret.Key(), true
138}
139
140// Min returns the Min value of the tree
141func (avl *AVL[T]) Min() (T, bool) {

Callers

nothing calls this directly

Calls 1

KeyMethod · 0.65

Tested by

no test coverage detected