Skip to content

bgmet/sorting_algorithm_visualiser

Repository files navigation

Sorting algorithms visualiser

Typical animation that you are familiar with, seen on youtube. I want to recreate that to get closer to sorting algorithms and to do other things than doomscroll and youtube rot.

Approach

Since this project is in c++, I will use classes:

  • Window handler class: draw, clear, update etc

  • Sorting algorithm class: vector, get functions to draw etc

  • Add colors to show which is the current number and with which other element do we compare it

Implemented algorithms

  • Bubble Sort

  • Insertion Sort

  • Selection Sort

  • Gnome Sort

  • Merge Sort

  • Quick Sort

  • Heap Sort // way too hard for now

Embellishment

  • Add a better color system

  • Provide some information on the screen: number of comparisons etc

  • Timer for the sort

  • Add thickness to the lines: if stick thick enough, make it thinner, black background will take care of the rest

  • Implement a shuffling algorithm: in order to have unique simulations

  • dynamic_cast for the size of values on base case (stack_empty_once): right now set w/ constant 99

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors