This project visualizes various sorting algorithms using Pygame. It helps understand how different sorting algorithms work by providing a visual representation of the sorting process.
- Visualize Bubble Sort, Insertion Sort, and Merge Sort.
- Control sorting order (Ascending or Descending).
- Easily reset and start sorting again.
- Simple and intuitive controls.
R
: Reset the list with new random values.SPACE
: Start the sorting process.A
: Set sorting order to Ascending.D
: Set sorting order to Descending.I
: Select Insertion Sort.B
: Select Bubble Sort.M
: Select Merge Sort.
- Python 3.x
- Pygame
-
Clone the repository:
git clone https://github.com/yourusername/sorting-visualization.git
-
Navigate to the project directory:
cd sorting-visualization
-
Install the required packages:
pip install pygame
Run the main script to start the visualization:
python main.py