PreOrder Traverses the tree in the following order Root --> Left --> Right
()
| 94 | |
| 95 | // PreOrder Traverses the tree in the following order Root --> Left --> Right |
| 96 | func (t *RB[T]) PreOrder() []T { |
| 97 | traversal := make([]T, 0) |
| 98 | preOrderRecursive[T](t.Root, t._NIL, &traversal) |
| 99 | return traversal |
| 100 | } |
| 101 | |
| 102 | // InOrder Traverses the tree in the following order Left --> Root --> Right |
| 103 | func (t *RB[T]) InOrder() []T { |
nothing calls this directly
no outgoing calls
no test coverage detected