dastal - v5.0.0 / AATreeNode
An AATree node interface.
In addition to being a binary tree node, each node requires a balancing mechanism in the form of a numeric 'level' that has the following properties (source):
- The level of every leaf node is one.
- The level of every left child is exactly one less than that of its parent.
- The level of every right child is equal to or one less than that of its parent.
- The level of every right grandchild is strictly less than that of its grandparent.
- Every node of level greater than one has two children.
Name |
---|
T |
-
↳ AATreeNode
• Optional
left: AATreeNode<T>
A link to the node's left child.
• level: number
The level of the node.
• Optional
right: AATreeNode<T>
A link to the node's right child.
• value: T
The value of the node