A simple pygame visualization, to visualize the working of the Bubble sort algorithm, in python.
Here's a Demo on how it works
The project uses pipenv for dependencies.
To install the dependencies for the project, use this command
pipenv sync -d
pipenv run start
Here are the controls!
Space
key press to start running the algorithm, and run it for the pre-added list.R
Key press to generate a random array again, and sort it using the algorithm.
Color Coding Syntax:
TURQUOISE
: SWAP In progressRED
: They're static, no swapGREEN
: They're swappedWHITE
: Reset Color
Modifying the default list
You can modify the default list, by changing the value of the variable ARRAY
in __init__.py
And use the following controls as written above to visualize it's sorting.
We love people's support in growing and improving. Be sure to leave a ⭐️ if you like the project and also be sure to contribute, if you're interested!
Made by janaSunrise with ❤