MCPcopy Create free account
hub / github.com/0xAX/go-algorithms / Max

Method Max

binaryTree/binaryTree.go:48–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46}
47
48func (tree *BinaryTree) Max() interface{} {
49 if tree.node == nil || tree.right.node == nil {
50 return tree.node
51 }
52 return tree.right.Max()
53}
54
55func (tree *BinaryTree) Min() interface{} {
56 if tree.node == nil || tree.left.node == nil {

Callers 1

Test_minmaxFunction · 0.80

Calls

no outgoing calls

Tested by 1

Test_minmaxFunction · 0.64