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

Method Min

structure/tree/rbtree.go:142–149  ·  view source on GitHub ↗

Min returns the Min value of the tree

()

Source from the content-addressed store, hash-verified

140
141// Min returns the Min value of the tree
142func (t *RB[T]) Min() (T, bool) {
143 ret := minimum[T](t.Root, t._NIL)
144 if ret == t._NIL {
145 var dft T
146 return dft, false
147 }
148 return ret.Key(), true
149}
150
151// Predecessor returns the Predecessor of the node of Key
152// 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