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

Method Has

structure/tree/rbtree.go:90–93  ·  view source on GitHub ↗

Has Determines the tree has the node of Key

(key T)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected