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

Method Min

structure/tree/bstree.go:133–140  ·  view source on GitHub ↗

Min returns the Min value of the tree

()

Source from the content-addressed store, hash-verified

131
132// Min returns the Min value of the tree
133func (t *BinarySearch[T]) Min() (T, bool) {
134 ret := minimum[T](t.Root, t._NIL)
135 if ret == t._NIL {
136 var dft T
137 return dft, false
138 }
139 return ret.Key(), true
140}
141
142// Predecessor returns the Predecessor of the node of Key
143// 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