46 comments

[ 3.2 ms ] story [ 74.2 ms ] thread
This is so cool! Not only is the design similar, but just like the real IKEA instructions, I can't understand them! This is as realistic as it gets.
at best I can see trouble in interpreting "throw cube and shade a bar" as "choose randomly"

but if you don't understand it at all... I have bad news for you

I kind of get it, but just like Ikea instructions, you start second guessing yourself, then you realize, its BACKWARDS after you flip back 5 pages in when something doesn't fit.
If I didn't know how quicksort works - and I had to learn, since for some reason in FP languages quicksort is typically next after "hello world" - I would struggle to make sense of the pictures, I think. However, it's absolutely brilliant as a memory refresher: it packs so much info in so little space that it's insanely efficient. I imagine it would pair well with a good textbook on algorithms.
I miss the default IKEA instruction to have two people for building even the tiniest piece of furniture.
It looks like Step 3 may be using Hoare's original partitioning method with two pointers, which is laudable.
Seems to be:

1) Pick a random (dice roll) pivot

5) Move all values less than pivot before it, all greater than after it

6) Recurse to sort elements before & after pivot

This is cool, but missing a LOT of details between steps 4 and 5, which is the meat of the quicksort. Actually, the first and last elements of step 4 would be swapped, which means the order depicted in step 5 is incorrect.
(comment deleted)
I agree, IKEA instructions are great. A bit related are railroad diagrams, like the one of the JSON syntax [2].

I worked on Rubik's cube solving instructions for beginners [1] (for my children initially), but then I found it would be so much better if the instructions are IKEA style. (Then I vibe-coded a Rubik's cube 2D and 3D model, and now I stopped working on this. Something for later.) For the cube, I want to implement the algorithm, and then from the program create IKEA instruction (or a mix of IKEA and railroad diagram). That way I can be sure I didn't skip any steps in the instructions.

[1] https://github.com/thomasmueller/rubiks/blob/main/README.md

[2] https://www.json.org/json-en.html

Step #5 is very much a "draw the rest of the fucking owl" step.
If we're willing optimize for aesthetic over ability to help understand, I'll nominate demonstration via Hungarian Folk Dance[1] as a candidate for the best medium to depict sorting algorithms, which I first saw during a lecture years ago when the professor pulled up on of the videos to show us in class

[1]: quicksort is shown here, but the channel has plenty of others https://youtu.be/3San3uKKHgg

I was disappointed that men in the video were sorted by their numbers, but not their height! ;)
Step 4 is that one step you have to move all the pieces around repeatedly to match the paper until you realize one them is upside down and the other side is lightly sanded.
Don't call it quicksört (aka quicksørt/quicksœrt). It's so jarring to read. It's pronounced line the vocal sound in "learn"
Brilliant. Never heard of this site.
Nice! KVICK SÅRT, would be the most correct swenglish title though.
I think a much better explanation would be to just say that it partitions the values into a lower and higher half. Then it recursively does the same thing to each half.

After that you just have to understand exactly how partitioning works and get the ranges correct.

This surprisingly made this easy to remember for me.

Unfortunately, the merge sort instructions doesn't make sense to me, specifically step 3.

I’ve just completed reading all 8 posters on the site. For some reason I find them easier to understand than any written content, code or math. They are all intuitive. It was fun and engaging to solve their notation and meaning they want to convey. The one with AVL trees was the most useful to me.
Also checked the PDF compilation and it is a surprisingly effective way to explain algorithms considering there are no words at all.
It should be possible to better explain in IKEA style how to perform partitioning with swapping. In its current form it can make people fall into a quadratic complexity trap.
Oh my goodness, I'm in love with this site! One of my favourite things about HN is all of the cool sites I discover through the community :D
Seeing a random Ö hurts my Swedish brain. Especially when "Sort" is Swedish already.
I am wondering if we could use any llm to generate similar graphs lol.
The recursion element should be a reproduction of the entire IKEA instruction in miniature
I was confused by step (3). The right pillar doesn't need to move right because it's already to the right of the chosen pillar.

I guess what it's trying to say is just "mark it as needing to be to the right", and then do the opposite in (4) and then (5) is where things actually move.

(comment deleted)
I've tried to have AI generate these types of visual instructions from text without luck. Perhaps it was the IKEA-style guide I needed.