Skip to content

66-m/sorting-visualizer

Repository files navigation

Logo

Sorting Algorithm Visualizer

Visualize and audiolize sorting algorithms in real time — with 22 algorithms, 30 visualizations, and full 3D support.

Java CI with Maven License: MIT Latest Release


Download latest release »  ·  Report a bug or request a feature


Program demo

Table of Contents


Getting Started

Download the prebuilt JAR and run it with:

java -jar sorting-visualizer.jar

Requires Java 25 or later. Download from jdk.java.net/25.


Building from Source

Requirements:

Clone and build:

git clone https://github.com/66-m/sorting-visualizer.git
cd sorting-visualizer

# Build (using bundled Maven wrapper — recommended)
./mvnw clean package
# or use the convenience script:
./build

Run:

java -jar target/sorting-visualizer.jar
# or:
./run

The build and run helper scripts are provided for Unix-like systems.


Features

Sorting Algorithms

22 algorithms available:

Quick Sort (Middle Pivot) Quick Sort (Dual Pivot) Merge Sort
Shell Sort Selection Sort Double Selection Sort
Insertion Sort Heap Sort Gravity Sort
Radix Sort (LSD, Base 10) Gnome Sort Comb Sort
Odd Even Sort Bubble Sort Cocktail Shaker Sort
Cycle Sort Counting Sort American Flag Sort
Bucket Sort Pigeonhole Sort Tim Sort
Bogo Sort

Algorithm run options:

  • Run all algorithms in sequence
  • Change the execution order
  • Select which algorithms to include

Visualizations

30 visualizations including 3D models:

2D Visualizations (20)
  • Bars
  • Scatter Plot / Scatter Plot Linked
  • Number Plot
  • Disparity Graph / Disparity Graph Mirrored
  • Horizontal Pyramid
  • Color Gradient Graph
  • Circle
  • Disparity Circle / Disparity Circle Scatter / Disparity Circle Scatter Linked
  • Disparity Chords
  • Disparity Square Scatter
  • Swirl Dots
  • Phyllotaxis
  • Image Vertical / Image Horizontal
  • Hoops
  • Morphing Shell
  • Mosaic Squares
3D Visualizations (10)
  • Sphere
  • Sphere Hoops
  • Spheric Disparity Lines
  • Disparity Sphere Hoops
  • Cube
  • Cubic Lines
  • Pyramid
  • Plane
  • Disparity Plane

Controls & Settings

  • Array: Configurable size and shuffle type (Random, Reverse, Almost Sorted, Sorted)
  • Color gradients: Choose from presets or create your own
  • Speed: Adjustable animation speed
  • Sound: Toggle mute at any time
  • Live measurements: sorted %, comparisons, swaps, array writes, auxiliary writes, estimated real time
  • Comparison table: Optionally display a summary after all algorithms have run
  • Cancel: Stop execution at any time

Acknowledgements

Thanks to w0rthy and Musicombo for their amazing videos and for inspiring this project.

Thanks to @micycle1 for his mirror of the processing4 core library, making it available for Maven.

About

Visualizes and audiolizes 22 sorting agorithms with 30 different visuals

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages