Minimum-sized AVL Trees

Below is an applet for creating AVL trees of a specified height, using the fewest number of nodes possible.

Warning: The number of nodes increases exponentially with the height; hence, this applet uses exponential time and space. For this reason, heights no greater than 20 are recommended.


It is possible, for a variety of reasons, that the above applet might not run on your browser. For this reason (or others), you might wish to download the applet and run it as an application. As long as you have the JavaTM SE Runtime Environment (which can be downloaded from the Oracle® Software Downloads page) installed, there are two ways to do this:

Source Files:

Last updated November 25, 2010.

Rod Howell (

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.