My first thought was that it would be explaining Quicksort using an Ikea warehouse as a metaphor, to show how different algorithms suit different constraints. As for the actual Ikea-style instruction pamphlet... I suspect that making it was very helpful for the author. But I don't think the result would have helped me as a novice. It took some work for me to understand the diagram, and I've used Quicksort.
Quicksort explained IKEA-style
81–90 of 142 posts
Re: Quicksort explained IKEA-style
#82My first thought was that it would be explaining Quicksort using an Ikea warehouse as a metaphor, to show how different algorithms suit different constraints. As for the actual Ikea-style instruction pamphlet... I suspect that making it was very helpful for the author. But I don't think the result would have helped me as a novice. It took some work for me to understand the diagram, and I've used Quicksort.
Assume spades In your first pass, divide the deck into black and red cards. Then divide black into spades and clubs. Then divide spades into 7. Then insertion sort the cards 7, spades are now sorted. Clubs come next, divide into 7, insertion sort, and combine. Split diamonds and hearts, repeat with diamonds, repeat with hearts.
“What about the pivot thing?” Well, that's because we don't know the midpoint of our set in a typical sort. So instead you can just grab a random card and then go through the deck to find all cards < that card. If you want slightly fewer passes, use median of three.
Re: Quicksort explained IKEA-style
#83If 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
So what is the best algorithm when you have a bunch of people and want them sorted in order of, say, birthday.
Practical CS theory isn’t really relevant here because it is N-parallel for N people.
Re: Quicksort explained IKEA-style
#84If 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.
Yeah this is lousy. This wouldn’t teach anyone anything.
Re: Quicksort explained IKEA-style
#85If 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.
> for some reason in FP languages quicksort is typically next after "hello world" Because the recursive implementation is surprisingly straightforward and concise, and more-less demonstrates what the whole paradigm is about. As much as I hate to admit it, it's a good learning artifact.
This is why developer docs are trash. Because 90% of us can’t even identify when we are talking over everyone’s heads.
Re: Quicksort explained IKEA-style
#86Or there's quick sort in Hungarian dance if you prefer Quick sort with Hungarian, folk dance https://www.youtube.com/watch?v=3San3uKKHgg
Re: Quicksort explained IKEA-style
#87https://communities.sas.com/t5/Graphics-Programming/Fun-With...
Re: Quicksort explained IKEA-style
#88merge sort has a better big O, is cleaner conceptually, and is trivial to run concurrently.
bah humbug
Re: Quicksort explained IKEA-style
#89The name feels like such a near miss though... Kvick (beyond being my surname) does mean quick and I see they changed to it from kwick to make the title "more Swedish". Great! But sört? That's not a Swedish word and feels very "trying to seem Swedish without knowing any Swedish". That letter would be pronounced somewhat like the u in blur.
Meanwhile sort in Swedish is sortera. Sort itself does mean sort as in kind/type. So perhaps Kvick Sort would be the best version of the name?
Re: Quicksort explained IKEA-style
#90Nice! KVICK SÅRT, would be the most correct swenglish title though.
At least they changed the first word to Kvick because it means the right thing and sounds about right. And it happens to be my family name.