A post of a good sort
October 7, 2017 7:03 AM   Subscribe

 


ly ious prev
posted by JoeXIII007 at 7:37 AM on October 7, 2017 [2 favorites]


Nice! I'm a little ehhh in strictly aesthetic terms on using HSV hue as the basis for the spectrum because it's awfully garish, but I get why it's a workable choice in this context vs. something subtler like a greyscale.

Also please to see bogosort get a shout out in the comment on the main link. Bogosort forever. (Literally.)
posted by cortex at 8:49 AM on October 7, 2017 [1 favorite]


Mesmerizing, thanks! And I’m sure everyone has already seen these folks, but here’s another sorting visualization- via dance.
posted by hilaryjade at 9:08 AM on October 7, 2017 [1 favorite]


"I think the bubble sort would be the wrong way to go." —Barack Obama
posted by ckape at 10:15 AM on October 7, 2017 [5 favorites]


It's interesting that heap sort works so oddly because it's one of the few sorting algorithms that would be my goto if someone made me implement a sorting algorithm for a programming interview or something. Either that, or merge sort. Merge sort is good because it's an actual way that people would sort, say, pieces of paper. Heapsort is good because all you have to do is show how to delete and add an item and then you are done.
posted by RustyBrooks at 11:30 AM on October 7, 2017


Those are pretty, but I find it harder to envision what's actually going on in most of them than I would just watching a single set be sorted.
posted by jferg at 11:35 AM on October 7, 2017


Radix Sort is how you'd sort library card-catalog cards. I find that explanation works a lot better than trying to show it with animated color graphics.

Look at the first letter of the name on each card. Throw all the A's in one pile, all the B's in another pile, etc. for 26 piles. Then grab the big pile of A's and look at the second letter of the name on each card, and parcel them all out into another 26 smaller piles. Repeat until all your piles have only 1 card in them.

You never have to compare two names for alphabetical order -- just look at letters and toss cards into piles.

At the end you gather all those 1-card piles together, and voila! you have a big sorted stack of cards, even though you never manually ordered them, like by saying "Asimov... goes after Anthony, but before Attanasio."

(In reality, when the sub-sub-sub-piles of cards get small enough, it's faster to just "insertion sort" them into order and move on, rather than laying out 26 empty spaces just to sort 3 cards.)
posted by Harvey Kilobit at 8:21 PM on October 8, 2017 [1 favorite]


Visualizations for colorblind users.
posted by Gyan at 10:23 PM on October 27, 2017


This is fascinating!
Insertion sort is exactly how I sort a cart of books before I shelve them.
posted by exceptinsects at 6:35 PM on November 2, 2017


« Older This was how, for the first time in my life, I...   |   Gen-X Women at Midlife: Fear, Anxiety, Anger Newer »


This thread has been archived and is closed to new comments