Heavily Inspired by the famous https://www.youtube.com/watch?v=kPRA0W1kECg
This Python script visualizes various sorting algorithms using the Tkinter GUI library.
It generates a random array of numbers and displays the sorting process in real time as different algorithms are executed.
algo_visualizer.mp4
- Sorting Algorithm Visualization: Watch sorting algorithms in action as they progressively sort an array.
- Multiple Sorting Algorithms: Includes Bubble Sort, Selection Sort, Insertion Sort, Quick Sort, Merge Sort, Shell Sort, Gnome Sort, Comb Sort, Pancake Sort, and Cocktail Shaker Sort.
- Interactive UI: Simple button-based interface to select and execute sorting algorithms.
- Real-time Updates: The visualization dynamically updates as the algorithm progresses.
- Reset Functionality: Regenerate a new randomized array for further testing.
Ensure you have the following installed:
- Python 3.x
- Required Python packages (if needed):
pip install tkinter
Execute the following command to start the sorting visualizer:
python sorting_visualizer.py
- Bubble Sort
- Selection Sort
- Insertion Sort
- Quick Sort
- Merge Sort
- Shell Sort
- Gnome Sort
- Comb Sort
- Pancake Sort
- Cocktail Shaker Sort
- Click on a sorting algorithm button to start sorting.
- Click the Reset button to shuffle the array and try again.
- Add more sorting algorithms.
- Improve visualization effects.
- Add speed controls to adjust sorting speed.
- Add Audio Effects
- Create a web-based version for online use.
- Ensure Python 3 is installed and working properly.
- If the script does not display the GUI, check that Tkinter is installed.
- If the visualization appears too slow, adjust the sleep duration in the update function.
This project is open-source and available for modification.
Developed by Ottitsch. Contributions are welcome!