Lurker News
I'm curious to see some examples of what people consider good visual illustrations of CS concepts, from both usefulness and aesthetics perspectives.

Comments (312) 127 threads

Earlier comments
pram1 reply#
I have one of these hanging in my living room, they're beautiful!
sophacles2 replies#
I like your retro battlestation.

How did you hook your c64 up to an LCD?

Continue this thread — 2 replies

robertlagrant#
But which shell is it?
thanatos519#
That is great and should be in every textbook!
raddan1 reply#
There's an important distinction that your explanation glosses over, which is that MergeSort is an out-of-place sort while QuickSort is in-place. As a practical matter, this distinction is important and it makes the two algorithms not quite duals. Your explanation of why we can assume that QuickSort pivots are medians makes sense, but it also glosses over one of the deep insights about why QuickSort works at all, which is that with unsorted data, the choice of pivot will rarely be bad (it will be "near the middle on average.")
lkozma1 reply#
Yes, this efficiency-aspect is not captured in the illustration -- while splitting perfectly _by index_ comes for free, splitting perfectly _by value_ needs nontrivial work (median-finding).
chongli#
Yes and with naïve median-finding comes pathological inputs that hit the worst case O(n^2). Something to watch out for if you’re sorting user-provided input as that could open you up to some silly denial of service attacks!
ro_jazz#
Super cool!
robswc#
This is awesome. I think ppl should def share anything they made. As long as its not low-effort shilling... and your contributions are anything but!
Ono-Sendai#
QuickSort should be called PartitionSort - it would make this duality more obvious.
gardenhedge1 reply#
What's the significance of this?
complex_exp#
It's cool.
kzrdude#
How do we understand, inside this model, that merge sort is easily stable but quicksort is not a stable sort?

Load more comments