A picture is worth a thousand words so what is a video worth? Add some music and off you go reaching today’s multi-media generation. Yes I love a good visual aid. From several sources recently I found a set of demonstrations of how different sorting algorithms work. Fold dance and computer science may not be the most natural assumption you make but there videos work. They were created at Sapientia University, Tirgu Mures (Marosvásárhely), Romania. The group is on Facebook at http://www.facebook.com/AlgoRythmics and more dances are promised. I love this idea. [Note: updated 3 April 2011 with more dances]
- Bubble sort https://www.youtube.com/watch?v=lyZQPjUT5B4
- Selection sort: https://www.youtube.com/watch?v=ROalU379l3U
- Insertion sort: https://www.youtube.com/watch?v=Ns4TPTC8whw
- Merge-sort with Transylvanian-saxon (German) folk dance https://youtu.be/XaqR3G_NVoo
- Quick-sort with Hungarian (Küküllőmenti legényes) folk dance https://youtu.be/ywWBy6J5gz8
- Shell-sort with Hungarian (Székely) folk dance">Shell-sort with Hungarian (Székely) folk dance https://youtu.be/CmPA7zE8mx0
Not quite the musical treat as the dances from Algortythmics but still useful and interesting are these algorithm demonstrations at Open My Mind. (Thanks to Doug Peterson for the link) Here you will find a number of important algorithms with example code and the chance to see how they work on an interactive web page.
Each of these examples includes a code implementation (looks like some C variant – could be Java, C++ or C#) and some images (see below) that let you see the results as you step through the algorithm. You can go as fast or slowly as you like. This may be very helpful for classroom demos or as review tools.