r/coding • • Dec 03 '20

I Created a Visualization of 20 Sorting Algorithms with Java. Which one do you like most?

https://youtu.be/wGVIiUrESug
263 Upvotes

20 comments sorted by

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)

2

u/Silencer306 Dec 04 '20

That is very cool. May I ask what you used to create this? Itโ€™s in java you say, but what tool/library?

7

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!

2

u/not_some_username Dec 03 '20

How tf people make those ?

6

u/compilerstuck Dec 04 '20

programming and stuff. duh

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

u/EdwardMcFluff Dec 03 '20

this is beautiful

3

u/Rollertoaster7 Dec 04 '20

Radix was beautiful

2

u/zfolwick Dec 03 '20

this is so cool.

2

u/[deleted] Dec 03 '20

Definitely looks cool but less intuitive than the ones in wikipedia

2

u/mspaint22 Dec 04 '20

gnome sort be sounding like the jaws theme

2

u/[deleted] Dec 04 '20

Today I learnt you can sort without comparisons

2

u/fluffyzilly Dec 04 '20

Wow, niiice! What libraries were you use for visualisation?

1

u/captjakk Dec 04 '20

What drove the sound?

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?