AvlTree (gb.data)
An AVL tree is a self-balancing binary search tree. This means that we can guarantee insertion, removal and retrieval of data in O(log n) time, no matter what data you have in the tree. Its interface is similar to that of a Collection.
Properties
Balance
Return the balance factor of the AvlTree. It is either -1, 0 or 1.
Count
Return the number of elements in the tree.
Height
Return the height of the tree.
Key
Return the last used key. This can be Null if the element was removed meanwhile.
Methods
Clear
Clear the tree, i.e. remove all elements. This is
way faster than removing every element by assigning Null to it like
Exist
Return whether an element with the given key exists.
See also