PreOrder Traverses the tree in the following order Root --> Left --> Right
()
| 85 | |
| 86 | // PreOrder Traverses the tree in the following order Root --> Left --> Right |
| 87 | func (t *BinarySearch[T]) PreOrder() []T { |
| 88 | traversal := make([]T, 0) |
| 89 | preOrderRecursive[T](t.Root, t._NIL, &traversal) |
| 90 | return traversal |
| 91 | } |
| 92 | |
| 93 | // InOrder Traverses the tree in the following order Left --> Root --> Right |
| 94 | func (t *BinarySearch[T]) InOrder() []T { |
nothing calls this directly
no outgoing calls
no test coverage detected