Has Determines the tree has the node of Key
(key T)
| 87 | |
| 88 | // Has Determines the tree has the node of Key |
| 89 | func (avl *AVL[T]) Has(key T) bool { |
| 90 | _, ok := searchTreeHelper[T](avl.Root, avl._NIL, key) |
| 91 | return ok |
| 92 | } |
| 93 | |
| 94 | // PreOrder Traverses the tree in the following order Root --> Left --> Right |
| 95 | func (avl *AVL[T]) PreOrder() []T { |