Class TreeCounterNode<K, V>

Represents a node in a binary tree.

V> - The type of the family relationship in the binary tree.

Type Parameters

  • K = any
  • V = any

    The type of data stored in the node.

Hierarchy (view full)

Constructors

Constructors

  • The constructor function initializes a Red-Black Tree node with a key, value, count, and color.

    Type Parameters

    • K = any
    • V = any

    Parameters

    • key: K

      The key parameter represents the key of the node in the Red-Black Tree. It is used to identify and locate the node within the tree.

    • Optionalvalue: V

      The value parameter is an optional parameter that represents the value associated with the key in the Red-Black Tree node. It is not required and can be omitted when creating a new node.

    • Optionalcount: number = 1

      The count parameter represents the number of occurrences of a particular key in the Red-Black Tree. It is an optional parameter with a default value of 1.

    • Optionalcolor: RBTNColor = 'BLACK'

      The color parameter is used to specify the color of the node in a Red-Black Tree. It is optional and has a default value of 'BLACK'.

    Returns TreeCounterNode<K, V>