Static Visualiser for Comparison Sorting Algorithms (SVCSA for short) is exactly what the name sugests, a tool for visualizing comparison sorting algorithms.
A static visualisation of a sorting algorithm is a graphic (see the examples below) of the states a vector goes through when it is being sorted by a specific algorithm.
In order to use SVCSA make sure you have a version of python 3.x
installed and Pillow
.
I intend to add a GIF animation option for the SortAnimator
class.
Here are some examples for the currently implemented sorting algorithms:
Note that MergeSort is a modified version that I made in order to make it a comparison sorting algorithm, the running time is O(N^2).
- BubbleSort:
- SelectionSort:
- InsertionSort:
- MergeSort:
- QuickSort:
- HeapSort:
- ShellSort:
- CombSort:
More to be added soon!
If you want to help implementing more sorting algorithms I left a note at the end of the sorting algorithm library that tells you the format of the functions.