The constructor initializes a node with a key, value, and color for a Red-Black Tree.
The key
parameter is a key of type K
that is used to identify the node in a
Red-Black Tree data structure.
Optional
value: VThe value
parameter in the constructor is an optional parameter of type
V
. It represents the value associated with the key in the data structure being constructed.
Optional
color: RBTNColor = 'BLACK'The color
parameter in the constructor is used to specify the
color of the node in a Red-Black Tree. It has a default value of 'BLACK' if not provided
explicitly.
Represents a node in a binary tree.
Template: BinaryTreeNode<K,
V> - The type of the family relationship in the binary tree.