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

Method Min

structure/tree/avl.go:141–148  ·  view source on GitHub ↗

Min returns the Min value of the tree

()

Source from the content-addressed store, hash-verified

139
140// Min returns the Min value of the tree
141func (avl *AVL[T]) Min() (T, bool) {
142 ret := minimum[T](avl.Root, avl._NIL)
143 if ret == avl._NIL {
144 var dft T
145 return dft, false
146 }
147 return ret.Key(), true
148}
149
150// Predecessor returns the Predecessor of the node of Key
151// if there is no predecessor, return default value of type T and false

Callers

nothing calls this directly

Calls 1

KeyMethod · 0.65

Tested by

no test coverage detected