Balanced Search Trees

Steven J. Zeil

Old Dominion University, Dept. of Computer Science

Table of Contents

1. Thinking about tree heights
2. AVL Trees
2.1. Ordering
2.2. Example
2.3. Single Rotations
2.4. Double Rotations
2.5. Inserting into AVL Trees
2.6. Complexity
3. B Trees
3.1. Properties of B-Trees
3.2. Complexity of BTree operations
4. Red-Black Trees

We've seen that the performance of the main BST operations is bounded by the height of the tree, which can range from an ideal of O(log N) for balanced trees to an all-too-common O(N) for degenerate trees.

Various algorithms have been developed for building search trees that remain balanced. We'll look at 2:


In the Forum:

(no threads at this time)