A program to visually observe how various sorting algorithms work.
Sorting Algorithms, as programs, perform their magics behind the scenes. So, we can not see what exactly is going on during a sorting operation. The goal of this project is to help the user visually observe what exactly is happening to an array while a sorting algorithm is sorting it. This program visualizes the array as a bar graph, with the values of various indexes of the array shown as bars. During sorting, the position of the bars, representing the values of various indexes, change with the position of the corresponding indexes. Therefore, the user can see how a sorting algorithm works, and visually identify if an implemented sorting algorithm is working as intended.
The following YouTube video shows how to use this program :
- Java Swing
- Swing Worker
- Graphics2D
- Insertion Sort
- Bubble Sort
- Merge Sort
- Quick Sort
- Java Development Kit (JDK)
- Eclipse IDE
- Download and install JDK from here :
https://www.oracle.com/java/technologies/downloads
- Set "Path" variable for JDK by following the appropriate instructions from here :
https://docs.oracle.com/javase/tutorial/essential/environment/paths.html
- Download and install Eclipse IDE from here :
https://www.eclipse.org/downloads
- Copy this URI :
https://github.com/farhanrejwan/sorting-algorithm-visualizer
- After opening Eclipse, go to "File -> Import -> Git -> Projects from Git -> Clone URI". Paste the copied URI if it isn't pasted automatically. Click "Next -> Next -> Next".
- Select "Import existing Eclipse projects", click "Next", then click "Finish".
- Open "sorting-algorithm-visualizer -> src -> main -> Main.java" and run the project.
Farhan Rejwan - [email protected]
Project link - https://github.com/farhanrejwan/sorting-algorithm-visualizer