Abstract The id parameter is of type BinaryTreeNodeId and represents the unique identifier
for the binary tree node.
Optional val: TThe val parameter is an optional parameter of type T. It represents the value of the binary
tree node. If no value is provided, it will be undefined.
Optional count: numberThe count parameter is an optional parameter that represents the number of times the
value val appears in the binary tree node. If the count parameter is not provided, it defaults to 1.
Private _countPrivate _familyPrivate _heightPrivate _idPrivate Optional _leftPrivate _parentPrivate Optional _rightPrivate _valAbstract createThe function swaps the location of two nodes in a binary tree.
The swapNode parameter is of type FAMILY, which represents a node in a family tree.
the swapNode object after swapping its properties with the properties of this object.
Generated using TypeDoc
The constructor function initializes a BinaryTreeNode object with an id, value, and count.