MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / Has

Method Has

structure/tree/avl.go:89–92  ·  view source on GitHub ↗

Has Determines the tree has the node of Key

(key T)

Source from the content-addressed store, hash-verified

87
88// Has Determines the tree has the node of Key
89func (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
95func (avl *AVL[T]) PreOrder() []T {

Callers 1

DeleteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected