rthomp9 / sorting-visualizer

Visualizes and Audiolizes 18 Sorting Algorithms. Hosts 16 different Visuals and a User Friendly Settings Menu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Java CI with Maven License: MIT Patreon donate button


Logo

Sorting Algorithm Visualizer

Visualizes and Audiolizes Sorting Algorithms!
Try it »

View Demo · Report Bug · Request Feature


This Program Visualizes and Audiolizes Sorting Algorithms. It includes 18 different Sorting Algorithms which can be visualized with 16 differnt Visuals, including two 3D models. It comes with a user friendly settings menu, letting the user customize what the program should do and how it should look.
Program demo

Downloading and running the Visualizer

You can download the latest version of my Visualizer here

  • Option 1: Just download the executable and run it

  • Option 2: Download the prebuild JAR file and run it with

      java -jar sorting-visualizer-1.3.1.jar
    
  • Option 3: Clone the repository via git and build the code on your own:

Getting Started - Building the code yourself

Requirements:

  • An installed JDK that is at least version 14. Download the newest version here
  • Make sure your environment variables are set.

Clone this repository:

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

Building the Code:

  1. Open a Terminal in the project folder and execute:

     .\build
    
  2. Run the compiled jar with

     .\run
    

Features

  • Changing the array size

  • Selecting algorithms / Run all algorithms

  • Changing the shuffle type

    • Random
    • Reverse
    • Almost Sorted
    • Sorted
  • Selecting one of 16 Visualizations - two of those are 3D Models

  • Selecting different color gradients and creating your own!

  • Showing Measurements during the execution

    • Sorted Percentage
    • Counting Comparisons
    • Measuring the estimated Real Time
    • Counting Swaps
    • Counting Writes to the main Array
    • Counting Writes to possible auxiliary Arrays
  • Displaying a comparison table at the end to compare algorithms

  • Playing / Muting Sound

  • Canceling the current execution

  • Sorting Algorithms featured:

    • 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 (Base 10)
    • Gnome Sort
    • Comb Sort
    • Odd Even Sort
    • Bubble Sort
    • Cocktail Shaker Sort
    • Cycle Sort
    • Counting Sort
    • American Flag Sort

Known Issues (Work in progess)

  • Randomizing >2000 elements doesn't show an animation
  • Visuals ImageHorizontal & ImageVertical not included
  • BucketSort, BogoSort, PigeonholeSort and TimSort not included

How to Contribute

  1. Clone repo and create a new branch
  2. Make changes and test
  3. Submit Pull Request with comprehensive description of changes

Acknowledgements

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

Also a big thanks to @micycle1 for his amazing mirror of the processing4 core library, making it available for maven.

License

MIT - Marcel Mauel, 2022



Consider giving my work a ⭐ to show some ❤️


Buy Me A Coffee

About

Visualizes and Audiolizes 18 Sorting Algorithms. Hosts 16 different Visuals and a User Friendly Settings Menu

License:MIT License


Languages

Language:Java 99.9%Language:Batchfile 0.1%