Function
calculateDepth
(n, nilNode Node[T], depth int)
Source from the content-addressed store, hash-verified
| 104 | } |
| 105 | |
| 106 | func calculateDepth[T constraints.Ordered](n, nilNode Node[T], depth int) int { |
| 107 | if n == nilNode { |
| 108 | return depth |
| 109 | } |
| 110 | |
| 111 | return max.Int(calculateDepth(n.Left(), nilNode, depth+1), calculateDepth(n.Right(), nilNode, depth+1)) |
| 112 | } |
| 113 | |
| 114 | func minimum[T constraints.Ordered](node, nilNode Node[T]) Node[T] { |
| 115 | if node == nilNode { |
Callers
nothing calls this directly
Tested by
no test coverage detected