Class RedBlackTreeNode<K, V>

Represents a Node in a Binary Search Tree.

Type Parameters

  • K = any

    The type of the key.

  • V = any

    The type of the value.

Hierarchy (view full)

Constructors

Accessors

  • get count(): number
  • Gets the count of nodes in the subtree rooted at this node (used in order-statistic trees).

    Returns number

    The subtree node count.

    Time O(1), Space O(1)

  • set count(value): void
  • Sets the count of nodes in the subtree.

    Parameters

    • value: number

      The new count.

    Returns void

    Time O(1), Space O(1)

  • get familyPosition(): FamilyPosition
  • Gets the position of the node relative to its parent.

    Returns FamilyPosition

    The family position (e.g., 'ROOT', 'LEFT', 'RIGHT').

    Time O(1), Space O(1)