A number of the more important or interesting algorithms covered in this course are available as animations using
These allow you to view a picture of the data being manipulated while you “play” an algorithm, forward or reverse, pausing, moving continuously or just a short hop at a time, much as if you were desk checking the algorithm.
Download the animation
Right-click on one of the links and select the “Save … as” option (the exact wording varies from one browser to another).
Launch the animation.
Each animation is packaged as a .jar file. You will need a Java Runtime Environment (JRE) or Development Kit (JDK) version 11 or later, which you may well already have on your PC. If not, get it here. I recommend sticking with the LTS (Long Term Support) versions.
On Windows or MacOS, you should be able to launch the animation by double-clicking the .jar file or by opening it from the downloads bar of your browser.
On Linux, or if double-clicking does not work, launch the animation by giving the command
java -jar path-to-the-downloaded-jarfile
_Recent releases of Java appear to have broken backwards-compatibility with older like these demos. If the animation launches but does not activate the Algorithm menu, or if the picture seems to flicker badly,
These feature code from the textbook (Weiss) and/or from the lecture notes.
AVL tree (balanced binary search trees)
The hashing demos use a deliberately awful hash function (length of the string) to make it easy to select inputs that will collide. This allows you to observe collision handling easily.
(Right-click on the links and select “Save link as…” or the nearest thing offered by your browser to download.)