Inserts a new element with some automatic optimization. TODO: Make the optimization better.
Finds the largest value from the root.
Finds the largest value from the given root.
Finds the smallest value from the root.
Finds the smallest value from the given root.
Inserts an item at the given point. Returns true if the height of the tree have been raised.
Gets an element without allocation. Returns E.init if key not found.
Optimizes a BinarySearchTree by distributing nodes evenly.
Rebalances a tree.
Removes an element by key.
Rotates the subtree to the left by one.
Rotates the subtree to the right then to the left.
Rotates the subtree to the right by one.
Rotates the subtree to the right then to the left.
Returns the number of elements in the tree.
Nodes for each branches.
Implements a binary search tree without a key, meaning elements can be looked up in a different fashion, eg. through opEquals method overriding