A C++ sorting algorithm visualizer using SDL2. It visually demonstrates sorting algorithms like Bubble Sort, Insertion Sort, Selection Sort, and more.
- SDL2: Install via:
sudo apt-get install libsdl2-dev
- C++ Compiler: Make sure g++ is installed.
- Clone the repository
git clone https://github.com/yourusername/sorting-visualizer.git cd sorting-visualizer - Compile the code:
g++ visualizer.cpp -o visualizer -lSDL2
- Run the visualizer:
./visualizer
- 0 : Generate new randomized list
- 1 : Selection Sort Algorithm
- 2 : Insertion Sort Algorithm
- 3 : Bubble Sort Algorithm
- 4 : Merge Sort Algorithm
- 5 : Quick Sort Algorithm
- 6 : Heap Sort Algorithm
- q : exit out of Sorting Visualizer