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

Method Depth

structure/tree/bstree.go:118–120  ·  view source on GitHub ↗

Depth returns the calculated depth of a binary search tree

()

Source from the content-addressed store, hash-verified

116
117// Depth returns the calculated depth of a binary search tree
118func (t *BinarySearch[T]) Depth() int {
119 return calculateDepth[T](t.Root, t._NIL, 0)
120}
121
122// Max returns the Max value of the tree
123func (t *BinarySearch[T]) Max() (T, bool) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected