This repository represents a project for visualizing sorting algorithms in java using JavaFX. The application has more than 20 sorting algorithms and it is possible to change the speed of the visualization and the size of the array.
The motivation behind this project is to visualize sorting algorithms to help anyone understand how they work and how they are implemented. Sorting in general is a very important topic in computer science, and it is used in many applications and improving its performance is very important and constantly researched.
- Friendly GUI.
- Visualize sorting algorithms.
- More than 20 sorting algorithms:
- Binary Insertion Sort
- Bitonic Sort
- Bogo Fort
- Bubble Sort
- Bucket Sort
- Cocktail Shaker Sort
- Comb Sort
- Counting Sort
- Double Selection Sort
- Gnome Sort
- Heap Sort
- In Place Merge Sort
- Insertion Sort
- Merge Sort
- Odd Even Sort
- Optimized Bubble Sort
- Pancake Sort
- Quick Sort
- Selection Sort
- Shell Sort
- Stooge Sort
- Change the speed of the visualization.
- Change the size of the array.
Executable version of the app can be found here.
To run it, you only need to download it and have Java 17
or higher on your machine.
The project is written in Java
and uses JavaFX
for the GUI. To run the project you need to have JavaFX
installed and added to your IDE.
The project was developed using IntelliJ IDEA
and Java 17
.
- Choose the sorting algorithm you want to visualize.
- The default speed of visualization is
1
so if you want to make it faster you can choose a number less than1
and if you want to make it slower you can choose a number greater than1
. - The default size of the array is
100
so if you want to make it smaller you can choose a number less than100
and if you want to make it bigger you can choose a number greater than100
. - Click on Sort to start the visualization.
Each sorting algorithm has its own test class. The tests are written using JUnit 5
. The tests are written to test the correctness of the sorting algorithms and the performance of the algorithms. The performance tests are written to test the time complexity of the algorithms and the space complexity of the algorithms.
The tests are written to test the algorithms on different types of arrays:
- Sort ascending.
- Sort descending.
- All values are the positive.
- There is one element.
- No negative values in the tests since the bars of the app can't have negative values.
The test can be found here.
AVision.mp4
We welcome contributions to improve AVision App! Please follow the steps below to contribute:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Make changes and commit them to your branch.
- Open a pull request with a clear description of your changes.
- We will review and merge your changes as needed.