r/coding • u/compilerstuck • Dec 03 '20
I Created a Visualization of 20 Sorting Algorithms with Java. Which one do you like most?
https://youtu.be/wGVIiUrESug7
u/swoogles Dec 03 '20
Definitely Radix.
This is fantastic. I've seen dozens of variations of sorting visualizations over the years, but I think yours just claimed the top spot!
1
2
19
u/maustinv Dec 03 '20
By far the coolest visualization I have watched. I felt like some of the animations would even work as a badass loading cutscene in a tech game.
9
u/schwiz Dec 03 '20
Of course "LSD" sort looks the trippiest when you visualize it ๐๐very cool
7
u/geofflittle Dec 03 '20
Nice work! Do you mind describing what the visualization is? I'm slightly confused by it being in a circular configuration. What does the angle of a point represent? Position in the array?
3
3
2
2
2
2
2
1
0
u/xiipaoc Dec 04 '20
Hm, Bogosort feels inefficient.
What do the axes mean? Is each point at a constant theta but the r gets shuffled?
11
u/compilerstuck Dec 03 '20
There are 1500 Elements in an Array, visualized in a circle (red to blue)
Every Element has its own colour.
When 2 Elements are swapped:
- They change their position in the circle
- They get closer to the mid of the circle if they are more far from their original position
So.. original position means furthest away from mid (sorted)