RB represents a Red-Black tree. By default, _NIL = leaf, a dummy variable.
| 49 | // RB represents a Red-Black tree. |
| 50 | // By default, _NIL = leaf, a dummy variable. |
| 51 | type RB[T constraints.Ordered] struct { |
| 52 | Root *RBNode[T] |
| 53 | _NIL *RBNode[T] // a sentinel value for nil |
| 54 | } |
| 55 | |
| 56 | // NewRB creates a new Red-Black Tree |
| 57 | func NewRB[T constraints.Ordered]() *RB[T] { |
nothing calls this directly
no outgoing calls
no test coverage detected