Sorting algorithms demo (Java)

Quicksort screenshot

This Java program shows an animation of various sorting algorithms in action, such as bubble sort or quicksort.

The program includes these sorting algorithms: bubble sort, cocktail sort, selection sort, pancake sort, quasi-pancake sort, gnome sort, insertion sort, insertion sort (with binary search), Shell sort, heapsort, quicksort (double-ended), quicksort (sliding), Stooge sort, stupid sort, bozo sort.

Download

JAR file: nayuki-sort-demo.jar

On Windows, simply double click the JAR file to run it. Otherwise, type this on a command line: java -jar nayuki-sort-demo.jar

Source code

The source code is included in the JAR file, and is also hosted at GitHub. It is open source under the MIT license.

Browse the source code at GitHub: https://github.com/nayuki/Sorting-algorithms-demo

Or download a ZIP of all the files: https://github.com/nayuki/Sorting-algorithms-demo/zipball/master

The code package also includes JUnit test cases for every sorting algorithm to ensure that they are implemented correctly.