Projects · University

Visual Sorter v2

Stable 2025 Author

Twelve sorting algorithms drawn one comparison at a time with OpenGL and ImGui, with audio, a benchmarking mode and plotted results.

1 photo

  • Run times of each algorithm on reverse-sorted data
    Run times of each algorithm on reverse-sorted data

Each algorithm is written as a step function that advances the sort by exactly one visible comparison and keeps its progress in function-local state, so the renderer can draw every compare and swap. An optional SDL3 tone generator turns the sort into sound.

  • Bubble, insertion, selection, quick, shell, heap, radix LSD, cocktail, bogo, gnome, Timsort and spreadsort (the last two simplified).
  • Radix sort keys on the integer part shifted so the minimum becomes zero, which lets it handle negative input.
  • Performance mode times every algorithm (except bogo sort) over five data sets (mixed, all positive, all negative, sorted, reverse sorted), writes CSV and plots it with pandas and matplotlib.
  • Dependencies are fetched by CMake if missing, and correctness tests run through CTest.