Skip to content

The implementation of the sorting visualizer allows users to visually comprehend the working of several common sorting algorithms, including Selection Sort, Insertion Sort, Bubble Sort, Merge Sort, Quick Sort, and Heap Sort.

trinish11/Sorting-Vizulaizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Sorting Visualizer

Visualization of different sorting algorithms in C++ with SDL2 Library.

A sorting algorithm is an algorithm that puts the elements of a list in a certain order. While there are a large number of sorting algorithms, in practical implementations a few algorithms predominate. In this implementation of sorting visualizer, we'll be looking at some of these sorting algorithms and visually comprehend their working. The sorting algorithms covered here are Selection Sort, Insertion Sort, Bubble Sort, Merge Sort, Quick Sort and Heap Sort. The list size is fixed to 130 elements. You can randomize the list and select any type of sorting algorithm to call on the list from the given options. Here, all sorting algorithms will sort the elements in ascending order. The sorting time being visualized for an algorithm is not exactly same as their actual time complexities. The relatively faster algorithms like Merge Sort, etc. have been delayed so that they could be properly visualized.

Controls:-

WARNING: Giving repetitive commands may cause latency and the visualizer may behave unexpectedly. Please give a new command only after the current command's execution is done.

Available Controls inside Sorting Visualizer:-

  • Use 0 to Generate a different randomized list.
  • Use 1 to start Selection Sort Algorithm.
  • Use 2 to start Insertion Sort Algorithm.
  • Use 3 to start Bubble Sort Algorithm.
  • Use 4 to start Merge Sort Algorithm.
  • Use 5 to start Quick Sort Algorithm.
  • Use 6 to start Heap Sort Algorithm.
  • Use q to exit out of Sorting Visualizer

Samples

  • Sample 1 (Insertion Sort)

  • Sample 2 (Merge Sort)

About

The implementation of the sorting visualizer allows users to visually comprehend the working of several common sorting algorithms, including Selection Sort, Insertion Sort, Bubble Sort, Merge Sort, Quick Sort, and Heap Sort.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages