This is an interactive Java application that demonstrate various sorting algorithms through graphical interface. It is built using Java, Swing and AWT, this tool offers a clear, step-by-step visualization of how different sorting methods operate, making it an excellent resource for learning and teaching.
You can download the latest version of the Sorting Algorithm Visualizer JAR file from here.
- Visualization of multiple sorting algorithms including :
- Bubble Sort
- Insertion Sort
- Selection Sort
- Counting Sort
- Merge Sort
- Quick Sort
- Radix Sort
- Real-time graphical representation of sorting process.
- Adjustable sorting speed.
- Highlighting of active elements during the sorting process with different colors.
JAVA : core language used for implementing sorting algorithms ans visualizations.
SWING and AWT : used for creating the GUI
-> CONTROLLERS
- SortingVisualizer.java :- Main class to run the sorting visualizer
- SortingPanel.java :- panel to visualize sorting process
- CountingPanel.java :- Panel to show frequency of elements (used in counting sort)
- SortingAlgorithm.java :- Interface for sorting algorithms
-> ALGORITHMS
- BubbleSort.java
- InsertionSort.java
- SelectionSort.java
- CountingSort.java
- MergeSort.java
- QuickSort.java
- RadixSort.java
-
clone the project repository to your local machine
git clone https://github.com/KajalMishra-29/Sorting-Algorithm-Visualizer.git
-
navigate to project directory
cd Sorting-Algorithm-Visualizer
-
compile the code
javac -d bin src/controllers/*.java src/algorithms/*.java
-
run the SortingVisualizer class to launch the application
java -cp bin controllers.SortingVisualizer
- Import the project into your IDE
- Run the
SortingVisualizer.java
class directly