Returns the current node's child in the given direction
(can be undefined).
Values -1 (left) or 1 (right) for the direction input are used
for convenience, as it is the direct result of the CompareFunction.
Case 0 is not treated as it is considered already checked.
-1 (left) / 1 (right).
a child BinarySearchTreeNode or undefined.
Whether the current node has a child in the given direction.
Values -1 (left) or 1 (right) for the direction input are used
for convenience, as it is the direct result of the CompareFunction.
Case 0 is not treated as it is considered already checked.
-1 (left) / 1 (right).
true / false.
Sets the current node's child in the given direction.
-1 (left) / 1 (right).
The new Child.
Generated using TypeDoc
Represents a single element of a tree. Carrying a given value, it is linked to maximum two child nodes via
leftandrightfields.