A demonstraton of two well known sorting algorithms, in 3 dimensions and put in music. | ||
The algorithms featured are Insertion sort and Merge sort, on a permutation of the eight numbers 0 to 7, each represented by a 3d text representation of itself, of increasing size and (tentatively) colors ordered as in a rainbow. The animation is designed to show the cost in comparisons but also in the number of moves. Both algorithms are performing much better than their worst case, which makes the demonstration shorter, but still Insertion sort is slower than Merge sort. The music is arranged so that the instruments are introduced one by one during the insertion sort, while the melodies of the two main instruments are merging during merge sort. | ||
The video was generated using Alice (www.alice.org) and edited using iMovie, and the music was recorded using Garageband. You are welcome to use this video if you wish in any non-commercial application, if acknowledging my authorship. Contact me at jeremy.lejyby@gmail.com to notify me of its use, to ask a version in a better resolution or using another randomly generated example. |