Algorithm Visualizer

This project was a way for me to learn a new c++ framework (SFML) as well as get familiar with some common searching and sorting algorithms. The algorithms currently implemented are:

  • Simple Search
  • Binary Search
  • Quick Sort
  • Selection Sort
  • Bogosort

My favorite part of the project

The implementation of Bogosort is my favorite just because of it’s absurdity. If you aren’t familiar it works by randomly shuffling a set of data until it is sorted. It has an average Big Oh notation of O(n*n!) which is already horrible but it technically has a worst case scenario of O(∞). My claim to fame is that while testing it sorted my data set on its second try.

What would I change about this project

Mostly the visuals, they just do not look good and I think it really hurts the experience of using the program. I also think that my visualizations are a little confusing and not the best way to represent what is happening. I would want to completely overhaul how I handle the visuals before adding anything else to this project.

How can you view this project

There is no web build yet, I plan to eventually, probably after I overhaul the graphics, but currently you clone the gihub repository and build the solution.

Any interesting bugs or troubles in development

I had a couple of weird bugs, and a good bit of trouble. This was one of my first few projects outside of the world of a standard game engine which caused me a few headaches. I had a lot of trouble with finding a good way to visualize Quick Sort because it was running recursively. I eventually opted to just run the whole algorithm then render it in sections to fake it rendering as it solves the algorithm. This was also the first time I used function pointers and in the beginning I had a lot of issues figuring them out, but it ended up being a great part of my button class.