SortingAlgorithms


Click the Random Data button to generate data. You may want to change the default block size (the size of the squares that the applet draws) to some value other than 2. Then click on one of the sort buttons to get a visual representation of the sort process. The source for the applet comes in two files:

I also have other Java applets that you can have fun with!

The program can also be run as as standalone application. In fact, I recommend that you run it in that manner. The animation seems to be smoother that way. In order to use the latest version of Java, ensure that path variable (in your .cshrc file) starts with /opt/cs/usr/java/bin. Compile the source (javac SortingAlgorithms.java) and run it (java SortingAlgorithms). If you have any questions, feel free to send me e-mail at [email protected]