AVL Trees
CS361: Advanced Data Structures and Algorithms
Algorithm Animation
November 1999
Quick instructions:
-
when the animation window appears, select desired operations from the Algorithm
menu.
-
When execution pauses inside of an algorithm, press the continue
button to resume.
Things to Try:
- Try inserting several values in ascending order, or in descending order. Observe how the rotation prevents us from being stuck with a degenerate tree, as would happen with ordinary binary search trees.
- Use the "sequential" and "random" insertions to set up a tree to work on. (These will not pause but will generate the entire tree.)
- By default, the parent pointers are drawn along with the child
pointers. You can toggle the parent pointers on and off, as you
please, from the Algorithm menu, but only when you are not in the
middle of some algorithm.
- Experiment with "insert", and "find"
- After using "find" to select a position, you can try
"++"
- Try the different tree traversals.
Email me at zeil@cs.odu.edu
This animation was prepared using the AlgAE animation framework.
AlgAE applets run under Microsoft
Internet Explorer 4.0 (or later) and Netscape
Communicator 4.05 (or later).