Skip to content

An app made to visualize different sorting algorithms made with C++ and SDL2

License

Notifications You must be signed in to change notification settings

RickIsGone/sort-visualizer

Repository files navigation

Sort Visualizer

Sort Visualizer is an app made with SDL2 in C++ to show how different algorithms sort a list Preview

Important note

The time the app takes to order the list doesn't accurately reflect the algorithm's speed, if you want to know the actual time complexity of the algorithms read Time complexity

The sorting algorithms

The algorithms used in the app are:

  • Quick sort
  • Bubble sort
  • Insertion sort
  • Selection sort
  • Bogo sort
  • Miracle sort

Time complexity

Here I'll be listing every algorithm's time complexity, if you want to learn more about each algorithm, you can access it by clicking the algorithm's name

  • Best case: O(n log n)
    Average case: O(n log n)
    Worst case: O(n^2)

  • Best case: O(n)
    Average case: O(n^2)
    Worst case: O(n^2)

  • Best case: O(n)
    Average case: O(n^2)
    Worst case: O(n^2)

  • Best case: O(n^2)
    Average case: O(n^2)
    Worst case: O(n^2)

  • Best case: O(n)
    Average case: O(n n!)
    Worst case: O(?)

  • Miracle sort is a joke algorithm which does nothing, but theoretically, if given infinite time, enough bit flips would occur for the list to sort on its own.
    Best case: O(?)
    Average case: O(?)
    Worst case: O(?)

About

An app made to visualize different sorting algorithms made with C++ and SDL2

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages