Sorting algorithms, embodied in folk dance

Whether you think about it or not, like it or not, your computer spends much of its time sorting things. There are many ways, many recipes, many algorithms for sorting. Read all about them, if you want the full low-down, inĀ volume 3 of Donald Knuth’s bible of computer science.

But if you want a quick feel for how some of them work, you might instead begin by watching some curious videos of Hungarian folk dancers dancing sort of algorithmically. Here’s the sorting method called quicksort:

But what if you hate dancing, hate it to the extent that you don’t even want to watch a stylish applied mathematical dance? Well, strip off the costumes, replace all the people with colored lines, and here’s what you get:

(Thanks to investigator Stan Amar for bringing this to our attention.)

Comments are closed.