A real-time sorting algorithm visualizer built with Python and Pygame.
- Interactive Visualization: Watch sorting algorithms in action with highlighted comparisons and swaps
- Multiple Algorithms: Currently supports Bubble Sort and Quick Sort
- Real-time Performance: 60 FPS visualization with configurable delay
- Customizable Data: Adjustable array size (currently set to 200 elements)
- Python 3.x
- pygame
- numpy
pip install pygame numpypython start.py- Click Bubble Sort to visualize bubble sort algorithm
- Click Quick Sort to visualize quick sort algorithm
- Close window to exit
- Bubble Sort: O(n²) time complexity, compares adjacent elements
- Quick Sort: O(n log n) average case, uses iterative approach with stack to avoid recursion overflow
Modify the n variable in main() to change the number of elements (default: 200).