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

Struct BSNode

structure/tree/bstree.go:15–20  ·  view source on GitHub ↗

BSNode represents a single node in the BinarySearch.

Source from the content-addressed store, hash-verified

13
14// BSNode represents a single node in the BinarySearch.
15type BSNode[T constraints.Ordered] struct {
16 key T
17 parent *BSNode[T]
18 left *BSNode[T]
19 right *BSNode[T]
20}
21
22func (n *BSNode[T]) Key() T {
23 return n.key

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected