AccessNodesByLayer accesses nodes layer by layer (2-D array), instead of printing the results as 1-D array.
()
| 111 | |
| 112 | // AccessNodesByLayer accesses nodes layer by layer (2-D array), instead of printing the results as 1-D array. |
| 113 | func (t *BinarySearch[T]) AccessNodesByLayer() [][]T { |
| 114 | return accessNodeByLayerHelper[T](t.Root, t._NIL) |
| 115 | } |
| 116 | |
| 117 | // Depth returns the calculated depth of a binary search tree |
| 118 | func (t *BinarySearch[T]) Depth() int { |
nothing calls this directly
no outgoing calls
no test coverage detected