Skip to content

Sorting algorithms with Sorting Visualizer—a C++ project using SDL2, With Selection, Insertion, Bubble, Merge, Quick, and Heap Sorts.

Notifications You must be signed in to change notification settings

sanskritisahu21/Sorting-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sorting Visualizer

Visualization of different sorting algorithms with this C++ project utilizing the SDL2 library. Experience the visual representation of renowned sorting methods such as Selection Sort, Insertion Sort, Bubble Sort, Merge Sort, Quick Sort, and Heap Sort. With a fixed list size of 130 elements, users can randomize the list and select any sorting algorithm for visualization, all converging to ascending order.

How to Execute:

Utilize the C++ source code available in the repository (Sorting Visualizer.cpp) by installing and setting up the SDL2 library. Use x86_64-w64-mingw32 to setup the SDL2 files.

After SDL2 setup, include Sorting Visualizer.cpp in your project, configure the build options as per the tutorial, and run the project.

User Controls:

Note: Avoid repetitive commands to prevent latency and unexpected behavior. Wait for the current command to finish execution before inputting a new one.

Available Controls within Sorting Visualizer:

Press 0 to generate a new randomized list. Press 1 for Selection Sort. Press 2 for Insertion Sort. Press 3 for Bubble Sort. Press 4 for Merge Sort. Press 5 for Quick Sort. Press 6 for Heap Sort. Press q to exit Sorting Visualizer. Visual Samples:

Sample 1: (Insertion Sort)

Example1

Sample 2: (Merge Sort)

Example2

About

Sorting algorithms with Sorting Visualizer—a C++ project using SDL2, With Selection, Insertion, Bubble, Merge, Quick, and Heap Sorts.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages