Alvito is a tool for creating sorting and search algorithm visualizations and saving them as GIFs. You can find the alvito
class in the algorithm_visualizer.py
.
You can run this project and create your own GIFs directly in the browser by clicking this button: , or you can clone the project to your computer and install the required pip packages specified in the requirements text file.
pip install -r requirements.txt
from algorithm_visualizer import alvito
avo = alvito()
avo.fps = 1
avo.xlable_fontsize = 12
avo.title_fontsize = 12
array = [1,18,16,2,9,6,12,4,19,17,14,3,10,20,5,13,8,11,15,7]
avo.bubbleSort(array)
The code above will generate the following GIF
Here are links to view the notebooks on nbviewer if GitHub should struggle with them.
Examples.ipynb
Algorithms.ipynb
Colors_and_Colormaps.ipynb
Algorithm support so far (more coming soon!):
- Bubble Sort
- Selection Sort
- Insertion Sort
The code for the algorithms used in the tool comes from Problem Solving with Algorithms and Data Structures using Python. This is a great source to learn about algorithms and data structures, check it out!