Sorting Algorithm Visualizer
Visualizes sorting algorithms in real time. Made with Python.
Image Gallery
Click on an image to read more about it.
Selection Sort Visualized
This is the real-time visualization of the selection sort algorithm, shown by rectangles being sorted from smallest to largest.
Merge Sort Visualized
This is the real-time visualization of the merge sort algorithm, shown by rectangles being sorted from smallest to largest.
Insertion Sort Visualized
This is the real-time visualization of the insertion sort algorithm, shown by rectangles being sorted from smallest to largest.
Bubble Sort Visualized
This is the real-time visualization of the bubble sort algorithm, shown by rectangles being sorted from smallest to largest.
Features
This project is a sorting algorithm visualizer written in Python. The GUI was made using the built-in Tkinter library.
I made this project after learning about sorting algorithms in my last year of high school. At the time, I had learned selection sort, bubble sort, insertion sort, and merge sort. I implemented these sorting algorithms in this program and represented the array in memory by rectangles on screen. Then, as the array is manipulated by the algorithm, the positions of the rectangles are correspondingly updated.
Limitations
One functionality that I did not implement but would like to add is changing the number of rectangles being sorted. Currently, there can only be 64 rectangles. Visually seeing the effect that different list sizes have on the efficiency of the each algorithm would be very interesting.
I would also like to add a speed option, where a user can speed up or slow down the sorting. This might be as simple as adding or subtracting small periods of time between each iteration of the algorithm. This would be useful for slowing down algorithms to inspect them closer, or speeding up the more slow algorithms (I'm looking at you, bubble sort).
TEST