Options
All
  • Public
  • Public/Protected
  • All
Menu

This is the class implementation of the AVL tree nodes.

Type parameters

  • K: Ord = Ord

    The key type of the node.

  • V = unknown

    The value type of the node.

Hierarchy

  • AVLNode

Index

Constructors

Properties

Constructors

constructor

  • new AVLNode<K, V>(key: K, value: V): AVLNode<K, V>
  • Type parameters

    Parameters

    • key: K

      The key of the new node.

    • value: V

      The value of the new node.

    Returns AVLNode<K, V>

Properties

height

height: number = 1

The height of the node: 1 plus the height of the greater height child of the node. Nodes without children have a height of 1.

key

key: K

left

left: null | AVLNode<K, V> = null

The left child of the node.

right

right: null | AVLNode<K, V> = null

The right child of the node.

size

size: number = 1

The size of the node: the amount of nodes (including this node itself) within the node's subtree.

value

value: V