The key type that is derived from tree values, in order to compare their order.
The type of values that are to be stored in the tree.
Deletes the node with given key from the tree.
A boolean that indicates whether a node was deleted:
false
if the given key was not found in the tree, or true
otherwise.
Folds (reduces) the tree left-to-right using in-order traversal.
The type of the accumulation (and the seed).
The accumulator function.
The initial value.
The accumulation of the tree.
Folds (reduces) the tree right-to-left using reversed in-order traversal.
The type of the accumulation (and the seed).
The accumulator function.
The initial value.
The accumulation value.
Performs in-order traversal of the tree, applying the given fn
to each contained value.
The callback function to run for each value in the tree.
Inserts a new value into the tree.
A boolean that indicates whether a node was inserted:
false
if the key derived from given value is already
in the tree, or true
otherwise.
Returns true
if the tree does not have any nodes.
Returns a list of all keys within the tree as an array, in-order.
Returns the value within the tree that ranks highest, or null
if the tree is empty.
Returns the value within the tree that ranks lowest, or null
if the tree is empty.
Search a value by a given searchKey
, matching against keys of nodes.
The node key - which must be of type K - to look for.
The matching value contained in the tree, or null
if the key
is not in the tree.
Returns the size of the tree: the amount of nodes contained.
Returns a list of all values within the tree as an array, in-order.
The AVL tree's instance interface.