MCPcopy
hub / github.com/TheAlgorithms/Go / minimum

Function minimum

structure/tree/tree.go:114–123  ·  view source on GitHub ↗
(node, nilNode Node[T])

Source from the content-addressed store, hash-verified

112}
113
114func minimum[T constraints.Ordered](node, nilNode Node[T]) Node[T] {
115 if node == nilNode {
116 return node
117 }
118
119 for node.Left() != nilNode {
120 node = node.Left()
121 }
122 return node
123}
124
125func maximum[T constraints.Ordered](node, nilNode Node[T]) Node[T] {
126 if node == nilNode {

Callers 1

successorHelperFunction · 0.85

Calls 1

LeftMethod · 0.65

Tested by

no test coverage detected