HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
15 Sorting Algorithms in 6 Minutes

Timo Bingmann · Youtube · 116 HN points · 16 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Timo Bingmann's video "15 Sorting Algorithms in 6 Minutes".
Youtube Summary
Visualization and "audibilization" of 15 Sorting Algorithms in 6 Minutes.
Sorts random shuffles of integers, with both speed and the number of items adapted to each algorithm's complexity.
The algorithms are: selection sort, insertion sort, quick sort, merge sort, heap sort, radix sort (LSD), radix sort (MSD), std::sort (intro sort), std::stable_sort (adaptive merge sort), shell sort, bubble sort, cocktail shaker sort, gnome sort, bitonic sort and bogo sort (30 seconds of it).
More information on the "Sound of Sorting" at http://panthema.net/2013/sound-of-sorting
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Nov 14, 2022 · 1 points, 0 comments · submitted by shortlived
This reminds me of the audible sorting algorithm video.

https://www.youtube.com/watch?v=kPRA0W1kECg

teddyh
Sorting out Sorting from 1981: https://www.youtube.com/watch?v=HnQMDkUFzh4
rchiang
Not earlier than this, but Marc Brown's ACM Distinguished Dissertation from 1987 on Algorithm Animation: https://mitpress.mit.edu/books/algorithm-animation

I know I saw a video from around that time, but I couldn't find one online.

Nov 03, 2021 · 2 points, 0 comments · submitted by Audiophilip
just want to quickly share an IMHO interesting sorting algorithm visualization video: https://youtu.be/kPRA0W1kECg

"Visualization and "audibilization" of 15 Sorting Algorithms in 6 Minutes. Sorts random shuffles of integers, with both speed and the number of items adapted to each algorithm's complexity. The algorithms are: selection sort, insertion sort, quick sort, merge sort, heap sort, radix sort (LSD), radix sort (MSD), std::sort (intro sort), std::stable_sort (adaptive merge sort), shell sort, bubble sort, cocktail shaker sort, gnome sort, bitonic sort and bogo sort (30 seconds of it)."

For true beginners to programming (e.g. my elementary age kids), I found these resources to be really effective at what I think of as the most important lessons in programming:

* it's okay to try things

* you can't break it

* programming is very literal and precise

* there's syntax, there's structure, and there are operations

https://github.com/Akuli/python-tutorial/blob/master/README....

This one is the best, it is aimed square at anyone whose only experience with computers is typing and web browsing.

https://github.com/eka-foundation/numerical-computing-is-fun...

Also great for the leveling down, but you also have to teach some math and some concepts around functions and algorthms, which can definitely feel a little boring / pigeonhole programming as mostly a fancy calculator.

Use sparingly and wisely.

https://www.pythonforbeginners.com/code-snippets-source-code...

This is just one example, but the code snippets at Python for Beginners are well documented, designed with simple constructs, and are a great way to see "applied programming" / provlem solving to achieve an outcome.

One useful technique is to give your student the "problem" the code snippet solves and ask your students to describe how they would code it in words and you transcribe it as some pseudocode on a board, and then "debug" it together to address input validation, logic, efficiency, then they write it.in Python, and then compare your code to the actual snippet.

When their code is basically spot on with the snippet it's like they've won the lottery, I definitely had forgotten that magic ...

I should make a YouTube playlist of thr videos I've shown them, here's one they liked

* 15 Sorting Algorithms in 6 minutes - https://youtu.be/kPRA0W1kECg

I paused at each one and we broke down how it's sorting, by the 5th or 6th it only took a few seconds to figure out the algorithm, and then theyre just fun to watch.

For you as a programming educator, this is essential viewing

https://youtu.be/azcrPFhaY9k

madhadron
These are some great resources, thanks!
May 07, 2020 · 1 points, 0 comments · submitted by dirtnugget
Mar 20, 2020 · 2 points, 0 comments · submitted by drenginian
You may enjoy this: https://www.youtube.com/watch?v=kPRA0W1kECg

There are several similar videos on YouTube demonstrating sorts. If that's a bit sterile for you, you can get a more human touch via the playlist https://www.youtube.com/watch?v=EdIKIf9mHk0&list=PLOmdoKois7...

aliabd
This is terrific
rthille
In the 1990's, NeXT had a demo of their threading capabilities, and you could select a bunch of different sorts to run in parallel. Doesn't seem to be much still "live" on the net about it though: https://www.google.com/search?q=%22SortingInAction%22
Feb 07, 2020 · 3 points, 1 comments · submitted by fatboy
ColinWright
Here's how it was made: https://panthema.net/2013/sound-of-sorting/

It's history here on HN is intriguing, and a little sad. So many submissions, so little discussion. Do people feel that there's nothing to be said?

3 comments:

https://news.ycombinator.com/item?id=6829772

2 comments:

https://news.ycombinator.com/item?id=6819544

https://news.ycombinator.com/item?id=6536773

https://news.ycombinator.com/item?id=6138505

1 comment:

https://news.ycombinator.com/item?id=10768096

https://news.ycombinator.com/item?id=9385926

https://news.ycombinator.com/item?id=8805803

https://news.ycombinator.com/item?id=6140319

Many of the preceding comments were people just saying that there were lots of submissions, but no comments!

Even so, there are, indeed, so many submissions with no comments at all:

https://news.ycombinator.com/item?id=19522499

https://news.ycombinator.com/item?id=19045643

https://news.ycombinator.com/item?id=18731896

https://news.ycombinator.com/item?id=12473226

https://news.ycombinator.com/item?id=10447240

https://news.ycombinator.com/item?id=10356347

https://news.ycombinator.com/item?id=10330913

https://news.ycombinator.com/item?id=10327532

https://news.ycombinator.com/item?id=10309324

https://news.ycombinator.com/item?id=9419657

https://news.ycombinator.com/item?id=8111128

https://news.ycombinator.com/item?id=7757306

https://news.ycombinator.com/item?id=7754485

https://news.ycombinator.com/item?id=7448629

https://news.ycombinator.com/item?id=7292482

https://news.ycombinator.com/item?id=6832507

https://news.ycombinator.com/item?id=6668253

https://news.ycombinator.com/item?id=6614809

https://news.ycombinator.com/item?id=6452116

https://news.ycombinator.com/item?id=6179041 <- August 8th, 2013.

Mar 29, 2019 · 2 points, 0 comments · submitted by ameyv
Interesting site! Always cool to see these things visualised.

It reminds me of the visualisation of different sorting algorithm (with sound): https://youtu.be/kPRA0W1kECg

Jan 31, 2019 · 3 points, 0 comments · submitted by mromnia
Aug 07, 2018 · 1 points, 0 comments · submitted by max_
Oct 07, 2017 · d_watt on Sorting Visualizations
I like this project, reminds me a lot of https://www.youtube.com/watch?v=kPRA0W1kECg

What was used to generate the gifs?

jas_far
"The algorithms were written in C# using visual studio, and i used GIMP to make the actual gifs." https://imgur.com/user/FishyMcFishFace
May 14, 2017 · thomk on Animated Algorithms
This will hold you over while we wait!: https://www.youtube.com/watch?v=kPRA0W1kECg
Sep 11, 2016 · 5 points, 0 comments · submitted by someonewithpc
None
None
Dec 20, 2015 · 3 points, 1 comments · submitted by KerryJones
ColinWright
So many submissions, no discussion at all:

https://news.ycombinator.com/item?id=7292482

    Visualization and "audibilization" of
    15 Sorting Algorithms
    (youtube.com)
https://news.ycombinator.com/item?id=7448629

    15 Sorting Algorithms in 6 Minutes
    (youtube.com)
https://news.ycombinator.com/item?id=7731584

    Sorting algorithms visually explained
    (sorting.at)
https://news.ycombinator.com/item?id=7754485

    15 Sorting Algorithms in 6 Minutes -
    visualized, with sound
    (youtube.com)
https://news.ycombinator.com/item?id=7757306

    15 Sorting Algorithms in 6 Minutes
    (youtube.com)
https://news.ycombinator.com/item?id=8111128

    Music and visualization of 15 sorting algorithms
    (youtube.com)
https://news.ycombinator.com/item?id=8206081

    Visualization of Sorting Algorithms
    (digg.com)
https://news.ycombinator.com/item?id=8805803

    Visualization with sound of Sorting Algorithms
    (youtube.com)
https://news.ycombinator.com/item?id=9316708

    A simple guide to sorting algorithms
    (nathanepstein.github.io)
https://news.ycombinator.com/item?id=9385926

    The sound of 15 sorting algorithms
    (youtube.com)
https://news.ycombinator.com/item?id=9901503

    Sorting Algorithms
    (sorting-algorithms.com)
https://news.ycombinator.com/item?id=10309324

    Visualization and "audibilization" of
    15 Sorting Algorithms in 6 Minutes
    (youtube.com)
https://news.ycombinator.com/item?id=10327532

    15 Sorting Algorithms in 6 Minutes
    (youtube.com)
https://news.ycombinator.com/item?id=10330913

    15 Sorting Algorithms in 6 Min
    (youtube.com)
https://news.ycombinator.com/item?id=10356347

    15 Sorting Algorithms in 6 mins [video]
    (youtube.com)
https://news.ycombinator.com/item?id=10447240

    15 Sorting Algorithms in 6 Minutes
    (youtube.com)
My two-year-old daughter loves this. (Within this category, I'm partial to: https://www.youtube.com/watch?v=kPRA0W1kECg)
Oct 25, 2015 · 1 points, 0 comments · submitted by tmlee
Oct 08, 2015 · 2 points, 0 comments · submitted by samaysharma
Oct 05, 2015 · 2 points, 0 comments · submitted by LeoNatan25
Oct 04, 2015 · 3 points, 0 comments · submitted by tmlee
Oct 01, 2015 · 1 points, 0 comments · submitted by jimsojim
Sep 07, 2015 · dsyko on The Sound of Code [video]
This reminds me a lot of the sound of sorting algorithms https://www.youtube.com/watch?v=kPRA0W1kECg
archimedespi
Hah, had a lot of fun listening to those. Some of them sound a bit like some digital rf modes.
DonaldFisk
Fascinating.

Some early computers, such as the Elliott 803, had a built-in loudspeaker which received a pulse every time a jump instruction was executed. This meant you could tell which part of the program was executing, or whether it was in an infinite loop, just by listening. See, and indeed listen to, http://www.survo.fi/demos/#ex88

15 Sort Algorithms: Visualized & Audible

https://www.youtube.com/watch?v=kPRA0W1kECg

Apr 22, 2015 · 4 points, 0 comments · submitted by GotAnyMegadeth
Apr 16, 2015 · 3 points, 1 comments · submitted by Kortaggio
jaywunder
This is really awesome, good work on this.
Jul 30, 2014 · 2 points, 0 comments · submitted by neel8986
May 16, 2014 · 1 points, 0 comments · submitted by WestCoastJustin
May 16, 2014 · 1 points, 0 comments · submitted by piokuc
I always find this one nice to watch: 15 sorting algorithms in 6 minutes (with sound) https://www.youtube.com/watch?v=kPRA0W1kECg
Fascinating!

Another sorting visualization that I like is this one: https://www.youtube.com/watch?v=kPRA0W1kECg. It is well-known but the way everything falls back into place at each time... that's very satisfying.

Mar 22, 2014 · 7 points, 0 comments · submitted by AndyBaker
Reminded me of https://www.youtube.com/watch?v=kPRA0W1kECg

Only more colourful and interactive.

Feb 24, 2014 · 2 points, 0 comments · submitted by lucb1e
Reminds me of this: https://www.youtube.com/watch?v=kPRA0W1kECg
lolo_
Dude, don't tempt me to add sound :P
nni
I've played with sound as well with sort visualizations - it has been disappointing and more irritating than enlightening, but maybe there's a proper angle on it somebody will find that adds to the understanding of the algorithm.

And as the others have said - your rainbow viz is really nice, in a lot of ways :)

lloeki
I find this visual+audio version both entertaining and genuinely useful as tracking changes in multiple sounds at the same time that quickly, combined with the visual process gives more tangibility to the algorithm. Plus the punchline was unexpected and fits well to a "credits" part.
yxhuvud
I will always remember 'Sorting out Sorting'.

Should exist on the web somewhere if you havn't seen it.

blueblob
Sound is cool at first but then gets way annoying. I had never heard of radix sort, 0 comparisons.

Are you planning on adding more sorting algorithms like mergesort?

lolo_
Yeah, I am kidding - don't worry I won't, I can imagine that getting pretty irritating :P

I did this as a quick hack on a whim about a year ago (was a visualisation I wanted to see but couldn't find one quite like this), I am pleasantly surprised by the positivity on this (I kinda posted it on a whim), so I think I will probably hack on it again :-)

It's tempting to code up a whole bunch of sorting algorithms, merge and heap sort are definitely high on the list.

peff
Radix sort is one of those tricks that doesn't help often, but every once in a while can produce spectacular results. Here it is showing a 4x speedup on a particular operation in git:

https://github.com/git/git/commit/8b8dfd5132ce91f632b5303c39...

Additional useful resources:

* Sorting Algorithm Animations: http://www.sorting-algorithms.com/

* Data Structure Visualizations (interactive): http://www.cs.usfca.edu/~galles/visualization/Algorithms.htm...

* Sorting algorithm visualization (interactive): http://sortvis.org/

* 15 Sorting Algorithms in 6 Minutes (video, turn off sound): https://www.youtube.com/watch?v=kPRA0W1kECg

* Algorithm Visualization Portal: http://algoviz.org/avcatalog

* and I just found an old HN discussions with more resource links: https://news.ycombinator.com/item?id=1511332

Dec 02, 2013 · 2 points, 0 comments · submitted by Mitt
Dec 01, 2013 · 6 points, 3 comments · submitted by lauriswtf
emilioolivares
This is how it was done. Interesting read: http://panthema.net/2013/sound-of-sorting/
ColinWright
Some previous submissions:

https://news.ycombinator.com/item?id=6138505

https://news.ycombinator.com/item?id=6140319

https://news.ycombinator.com/item?id=6179041

https://news.ycombinator.com/item?id=6452116

https://news.ycombinator.com/item?id=6536773

https://news.ycombinator.com/item?id=6614809

https://news.ycombinator.com/item?id=6668253

https://news.ycombinator.com/item?id=6819544

There are many, many submissions with "sorting algorithm" in the title:

https://www.hnsearch.com/search#request/all&q=title%3A%28sor....

Some look interesting, although you'll need to sift through the repeats. One of the items that got several comments is this one:

https://news.ycombinator.com/item?id=5999443 : O(n) Sorting Algorithm: Quantum Bogosort (uwaterloo.ca)

Another:

https://news.ycombinator.com/item?id=2445963 : Sorting algorithms demonstrated with Hungarian folk dance (flowingdata.com)

And one more:

https://news.ycombinator.com/item?id=1997621 : Sorting Algorithm Animations (sorting-algorithms.com)

Not a huge amount of discussion, but some.

lauriswtf
Thanks!
Nov 29, 2013 · 4 points, 2 comments · submitted by naryad
hcarvalhoalves
This is amazing. Bubble sort actually sounds like bubbles.
ColinWright
Some previous submissions:

https://news.ycombinator.com/item?id=6138505

https://news.ycombinator.com/item?id=6140319

https://news.ycombinator.com/item?id=6179041

https://news.ycombinator.com/item?id=6452116

https://news.ycombinator.com/item?id=6536773

https://news.ycombinator.com/item?id=6614809

https://news.ycombinator.com/item?id=6668253

There are many, many submissions with "sorting algorithm" in the title:

https://www.hnsearch.com/search#request/all&q=title%3A%28sor...

Some look interesting, although you'll need to sift through the repeats. One of the items that got several comments is this one:

https://news.ycombinator.com/item?id=5999443 : O(n) Sorting Algorithm: Quantum Bogosort (uwaterloo.ca)

Another:

https://news.ycombinator.com/item?id=2445963 : Sorting algorithms demonstrated with Hungarian folk dance (flowingdata.com)

And one more:

https://news.ycombinator.com/item?id=1997621 : Sorting Algorithm Animations (sorting-algorithms.com)

Not a huge amount of discussion, but some.

Nov 04, 2013 · 6 points, 0 comments · submitted by evgenit
Oct 25, 2013 · 1 points, 0 comments · submitted by qsymmachus
Oct 12, 2013 · 17 points, 2 comments · submitted by swestwood
cmircea
Bogosort is the best.
barbchavez
COCK Tail Sort is the best! Didn't even know it existed, and I've been coding for like 10 years now!

Starts at 4:18 in the video. Enjoy!!

Sep 26, 2013 · 3 points, 0 comments · submitted by Daiz
Aug 08, 2013 · 1 points, 0 comments · submitted by mcenedella
Aug 01, 2013 · 7 points, 1 comments · submitted by jparishy
tylermauthe
My favourite is bogo.
Aug 01, 2013 · 10 points, 2 comments · submitted by Pro_bity
ballard
I don't know what happened, but I got to level 21 somehow. :)

This is cool and handy for lecturers explaining sorting/searching.

In practice: merge, insertion and dual pivot [1] /single pivot quick(er)sort [2] are the usual tools in the toolbox, that like everything, depend on the specific use. Oh, and radix sort for rainbow tables.

On DPQS, there's apparently a method for 1.8n ln n + O(n) [3]

References:

  1. http://www.iaroslavski.narod.ru/quicksort/DualPivotQuicksort.pdf

  2. The FlashSort Algorithm
     http://www.neubert.net/FSOIntro.html

  3. Optimal Partitioning for Dual Pivot Quicksort
     http://arxiv.org/abs/1303.5217

  4. Algorithm 271: quickersort (1965) 
     http://citeseerx.ist.psu.edu/showciting?cid=846385
  
  5. (and, of course) https://www.amazon.com/Art-Computer-Programming-Volume-Searching/dp/0201896850
 
     (same shrtnd) http://amzn.to/134daLz
Pro_bity
This is great context. Thank you.
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.