This project is a visualization tool for different sorting algorithms. It allows you to see how various sorting algorithms work in real-time, providing an educational tool for understanding the mechanics of sorting.
- Sorting Algorithms: Visualize several sorting algorithms including:
- Bubble Sort
- Insertion Sort
- Selection Sort
- Quick Sort
- Interactive Controls:
- R: Reset the list with random values
- SPACE: Start the sorting process
- A: Sort in ascending order
- D: Sort in descending order
- I: Switch to Insertion Sort
- B: Switch to Bubble Sort
- S: Switch to Selection Sort
- Q: Switch to Quick Sort
- Python 3.x
- Pygame library
-
Clone the repository:
git clone https://github.com/SohaibDM/Sorting-Algorithms-Visualizer.git cd Sorting-Algorithms-Visualizer -
Install the required packages:
pip install pygame
Run the main script to start the visualization:
python main.py