Below is an applet for creating and manipulating Binary Heaps,
Binomial Queues, Randomized Heaps, and Skew Heaps. Select one of the
choices from the choice box, and press the Start button. This will
open a window in which the tree can be created.
To create and manipulate a heap, enter any integer in the text field
in the upper left-hand corner, and press either the Put button to add
that integer as a priority. Press the RemoveMax button to remove the
maximum priority from the heap. The Back and Forward buttons allow
you to move through the history of your heap construction. The Clone
button opens a new window with an exact copy of the tree and history
in your current window; the tree in this window can then be
manipulated independently.
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. There are two
ways to do this:
Using JavaTM
Web Start. If you have
JavaTM Web Start installed, you may simply click here to launch the program as a
stand-alone application. The application will be cached by the Web
Start, and may subsequently be started via the Application Manager.
Running the program through the Application Manager does not require
internet access; however, the Application Manager will attempt to
determine whether an update is available prior to starting the
application. On Windows, shortcuts may be added to the desktop and/or
Start menu using the Application Manager (the second time you run the
application, you will be asked whether you want this done).
Manual download. Assuming you have at
least the Java 2 runtime environment installed on your machine, you
will first need to download viewer.jar (39K -
more information on viewer.jar).
Then you will need to download heapviewer.jar
(21K) to
the same directory. From that directory, you may run the program by
issuing the command:
java -jar heapviewer.jar
On Windows, you may also run the program by double-clicking the icon
for heapviewer.jar.
Sun, Sun Microsystems, the Sun Logo, and Java are trademarks or
registered trademarks of Sun Microsystems, Inc. in the United States
and other countries.