I used to be a TA and students always struggled to visualize sorting. So I built a tool to show exactly how they work!
Posted by iGotYourPistola@reddit | learnprogramming | View on Reddit | 8 comments
https://starikov.co/sorting-algorithms/
When I was a Teacher Assistant for an Intro to CS class, I noticed that a lot of students struggled to grasp the "personality" of different sorting algorithms just by looking at code. It’s one thing to memorize that Quicksort is O(n log n), but it’s another thing to actually see how it partitions an array compared to how Bubble sort slowly crawls to the finish line.
I was inspired by an old terminal-based visualizer I saw years ago, so I decided to build a modern web version to help people visualize these concepts. I ended up writing a comprehensive guide covering 25 different algorithms, including:
- The Classics: Bubble, Selection, Insertion, Merge, Quick.
- The Modern Standards: Timsort (used in Python) and Introsort (used in C++).
- The Weird Ones: Pancake Sort, Gnome Sort, and the chaotic Bogo Sort.
gilingalan@reddit
See how they visualized it before computers: https://youtu.be/3San3uKKHgg
Anonymous_Coder_1234@reddit
Nice.
iGotYourPistola@reddit (OP)
Thanks!
Anonymous_Coder_1234@reddit
I sent you a chat request. I have an app, but for user input it's all typing in strings. I want it to be multiple-choice like what you have. Can you explain how you got that?
syklemil@reddit
It's also possible to add sound to these things, possibly mostly to make the students and everyone else in the same room suffer.
Usually called something along the lines of the sound of sorting.
iGotYourPistola@reddit (OP)
This is nightmare fuel, I absolutely love it. I will take a stab at adding it, thanks :D
syklemil@reddit
Thanks, I'd ~~hate~~ love to hear the sound of timsort, powersort and whatever modern things have shown up in libraries since those other variants were made
iGotYourPistola@reddit (OP)
lol my first thought was how funny would it be if you hit Start and you hear…
TTIIIIIIIIIIIIiiiiiiiiimmmmmmm