Visualize Bubble Sort, Insertion Sort, and Selection Sort using Pygame.
Support both asceding sorting and descending sorting.
How To Use
- Download and run sorting.py
- Using the keyboard to choose your prefered settings. Options include:
- Space: start running the visualizer
- R: reset the visualizer
- A: set the visualizer to do ascending sort
- D: set the visualizer to do descending sort
- B: set the desired algorithm to Bubble Sort
- I: set the desired algorithm to Insertion Sort
- S: set the desired algorithm to Selection Sort
Demo
Visualize Bubble Sort in ascending order: