This project provides a visual demonstration of sorting algorithms, starting with the Bubble Sort algorithm. The application visually shows the process of sorting a list of numbers, highlighting comparisons, swaps, and the final sorted state.
- Bubble Sort Algorithm: Displays the sorting process in real-time, with color-coded steps to differentiate the various stages of sorting.
- Interactive Controls:
- Start, Stop, Step through the sorting process.
- Restart the visualization at any time.
- Color-coded Status:
- Yellow: Default (Unsorted)
- Blue: Comparing two elements
- Red: Swapped elements
- Green: Sorted
To run the project locally, follow these steps:
-
Clone the repository:
git clone https://github.com/sminerport/SortVisualizer.git
-
Navigate to the project directory:
cd SortVisualizer
-
Ensure you have Python installed. You may also need to install some dependencies:
pip install -r requirements.txt
-
Run the visualization:
python main.py
- Start: Begins the sorting process.
- Step: Manually advance the sorting one step at a time.
- Stop: Pauses the sorting process.
- Restart: Resets the list and restarts the process.
Currently, the visualization supports the Bubble Sort algorithm. More sorting algorithms (like QuickSort, MergeSort, etc.) may be added in the future.
Check out the demo of the Bubble Sort in action:
Contributions are welcome! If you have suggestions for improvements or want to add new features, feel free to open a pull request or issue.