Binary Search Tree - Types

Types

There are many types of binary search trees. AVL trees and red-black trees are both forms of self-balancing binary search trees. A splay tree is a binary search tree that automatically moves frequently accessed elements nearer to the root. In a treap (tree heap), each node also holds a (randomly chosen) priority and the parent node has higher priority than its children. Tango trees are trees optimized for fast searches.

Two other titles describing binary search trees are that of a complete and degenerate tree.

A complete tree is a tree with n levels, where for each level d <= n - 1, the number of existing nodes at level d is equal to 2d. This means all possible nodes exist at these levels. An additional requirement for a complete binary tree is that for the nth level, while every node does not have to exist, the nodes that do exist must fill from left to right.

A degenerate tree is a tree where for each parent node, there is only one associated child node. What this means is that in a performance measurement, the tree will essentially behave like a linked list data structure.

Read more about this topic:  Binary Search Tree

Famous quotes containing the word types:

    The rank and file have let their servants become their masters and dictators.... Provision should be made in all union constitutions for the recall of leaders. Big salaries should not be paid. Career hunters should be driven out, as well as leaders who use labor for political ends. These types are menaces to the advancement of labor.
    Mother Jones (1830–1930)

    He’s one of those know-it-all types that, if you flatter the wig off him, he chatter like a goony bird at mating time.
    —Michael Blankfort. Lewis Milestone. Johnson (Reginald Gardner)

    He types his laboured column—weary drudge!
    Senile fudge and solemn:
    Spare, editor, to condemn
    These dry leaves of his autumn.
    Robertson Davies (b. 1913)