Algorithm Visualizer A Python-based visualization tool for sorting algorithms. This project allows users to visualize how sorting algorithms like Bubble Sort and Insertion Sort work in real-time. The application is built using the pygame library.
Sorting Algorithms: Bubble Sort Insertion Sort
Interactive Controls: Highlight sorting order (Ascending/Descending) Highlight selected sorting algorithm Reset the list
Dynamic Visualization: Real-time visualization of sorting steps Color-coded bars for better understanding
Customizable: Adjustable list size and range of values
Install Python: Ensure you have Python 3.x installed on your system. Install Dependencies: Install the required library pygame using pip: Run the Program: Execute the Python script:
R: Reset the list with random values. SPACE: Start sorting using the selected algorithm. A: Set sorting order to Ascending. D: Set sorting order to Descending. I: Select Insertion Sort. B: Select Bubble Sort.
Bar Colors: Green: Current bar being compared. Red: Bar being swapped.
Highlighted Text: Sorting algorithm and order are dynamically highlighted. Reset button turns red for 1 second when pressed.
Requirements Python 3.x pygame library License This project is licensed under the MIT License. See the LICENSE file for details.
Inspired by various algorithm visualization tools. Built using the pygame library.